This is the mail archive of the gcc@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]

Re: [c++] bug 2628 and new




gdr@codesourcery.com said:
> | 3) we could issue a diagnostic when -fno-exceptions is enabled an 
> | operator new is called (and any other throw expression?)

> A pedwarn? 

I'd say that the solution should also work for the other situations 
(at least dynamic_cast on reference can throw). This somewhat rules
out the two first solutions proposed by Nathan.

In addition to the pedwarn, maybe there should be specific versions
of the generated code (functions) that implement new or dynamic_cast.
The code would print a message and call abort(). This is 
consistent with the behavior we have when calling pure methods.

	Theo.

--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------


PGP signature


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