2.95.1: warning about exceptions with -fno-exceptions

Carlo Wood carlo@runaway.xs4all.nl
Wed Oct 6 10:10:00 GMT 1999


Hi,

is this warning justified when using -fno-exceptions?

g++ -g -Wall -Woverloaded-virtual -Wundef -Wpointer-arith -Winline -Wwrite-strings -Werror -pipe -fno-exceptions -D__LIBCW__ -fpic -fpic  -I- -I../../include -c debugmalloc.cc -o debugmalloc.o
cc1plus: warnings being treated as errors
debugmalloc.cc: In function `void * operator new(unsigned int)':
debugmalloc.cc:881: warning: operator new should throw an exception, not return NULL
debugmalloc.cc: In function `void * operator new [](unsigned int)':
debugmalloc.cc:947: warning: operator new should throw an exception, not return NULL

I suppose no test case is needed...

-- 
 Carlo Wood  <carlo@runaway.xs4all.nl>

PS version 2.95.1 (release)


More information about the Gcc-bugs mailing list