This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [c++] bug 2628 and new
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: Re: [c++] bug 2628 and new
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Thu, 26 Apr 2001 18:58:17 +0200
- Cc: Nathan Sidwell <nathan at codesourcery dot com>, gcc at gcc dot gnu dot org
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