This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.2 bug: complex numbers and conditional op's don't mix
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.95.2 bug: complex numbers and conditional op's don't mix
- From: "Steven G. Johnson" <stevenj at superjdj dot mit dot edu>
- Date: Fri, 2 Jun 2000 23:09:55 -0400 (EDT)
- Reply-To: stevenj at alum dot mit dot edu
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;
}