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]

2.95.1: warning about exceptions with -fno-exceptions


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)


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