In C99, it looks like the '~' operator on a _Complex performs a complex conjugate. The following code:
#include <complex.h>
#include <stdio.h>
int main()
{
double _Complex a = 2 + 3 * I;
printf("%f,%f\n", creal(~a), cimag(~a));
}
Gives the output:
2.000000,-3.000000
This behaves the same in both gcc and clang. Is this an extension? I can't seem to find any reference to it in the various standards documents google pulled up.
If it is an extension, is there a way to deactivate it?