This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[c++] bug 2628 and new
- To: gcc at gcc dot gnu dot org
- Subject: [c++] bug 2628 and new
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Thu, 26 Apr 2001 16:00:53 +0100
- Organization: Codesourcery LLC
hi,
bug 2628 concerns operator new indicating failure by returning NULL, and
-fno-exceptions.
The user had turned off exceptions with -fno-exceptions and expected
operator new to indicate failure by returning NULL. What should the
expected behaviour be?
1) we could turn on -fcheck-new when -fno-exceptions is enabled. The
user must replace the system provided operator new.
2) we could call operator new (std::nothrow) in place of operator new ().
3) we could issue a diagnostic when -fno-exceptions is enabled an
operator new is called (and any other throw expression?)
thoughts?
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org