Bug in gcc-2.95 prerelease

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Sat Jul 31 23:33:00 GMT 1999


> // IMHO (1) is clearly a bug, if exceptions are disabled then the only
> // way to report errors from "operator new" is to return 0
> // This is non-conforming with the C++ spec, but also is
> // disabling exceptions ;-)

I agree this is surprising behaviour. However, it is out-of-scope of
the C++ standard (since there is no -fno-exceptions in standard c++),
so you are on your own. You can use -fpermissive to have g++ accept
that code.

Regards,
Martin



More information about the Gcc-bugs mailing list