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

Tim Prince tprince@computer.org
Fri Jun 2 22:08:00 GMT 2000


Same effect in gcc-2.95.2 and egcs-20000531 (the latest buildable version on my system).

----- Original Message ----- 
From: "Steven G. Johnson" <stevenj@superjdj.mit.edu>
To: <gcc-bugs@gcc.gnu.org>
Sent: Friday, June 02, 2000 8:09 PM
Subject: 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;
> }
> 



More information about the Gcc-bugs mailing list