This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc 2.95.2 bug: complex numbers and conditional op's don't mix


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]