bug in "operator ?:"

Gabriel Dos Reis Gabriel.Dos-Reis@cmla.ens-cachan.fr
Fri Mar 26 15:33:00 GMT 1999


Consider:

poivre% cat a.C 
struct X {};


int main()
{
    double* p = (true == false ? throw X() : new double);
}

poivre% g++ a.C 
a.C: In function `int main()':
a.C:6: converting to `void' from `double *'


This happens with egcs-2.93.12 on a solaris-2.[56] (I beleive the bug
to be platform independent). EGCS is in error according to 5.16/2.


-- Gaby


More information about the Gcc-bugs mailing list