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]

bug in "operator ?:"



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


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