gcc 2.95.2 bug: complex numbers and conditional op's don't mix
Steven G. Johnson
stevenj@superjdj.mit.edu
Fri Jun 2 20:11:00 GMT 2000
Dear gcc folks,
I get an error "type mismatch in conditional expression" in gcc 2.95.2 (on
Linux/x86) when compiling the following trivial and valid program.
The catch is that the program uses complex number types; it works fine if
I use e.g. "double" instead, so this seems to be a bug in the complex
number support.
Don't hesitate to email me if you need any other information. I would
also appreciate it if someone would try it in the latest CVS version of
gcc and post whether they can reproduce the bug. Thanks!
Cordially,
Steven G. Johnson
/* compile with gcc -c bug.c: */
void bug(void)
{
double __complex__ c2, c1 = 1;
c2 = 1 ? c1 : 0;
}
More information about the Gcc-bugs
mailing list