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]
Other format: [Raw text]

RE: "new" statement and -fno-exceptions


If you compile with -fno-exceptions, and you do not compile with -fcheck-new, don't constructors on new class objects blow up with NULL pointers when the new for that class (or a more global new) fails?

-----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org]On Behalf Of
Paolo Carlini
Sent: Monday, October 04, 2004 4:33 PM
To: Mike Stump
Cc: Paul Koning; gcc@gcc.gnu.org
Subject: Re: "new" statement and -fno-exceptions


Mike Stump wrote:

> -fno-exceptions doesn't change code you call, only your code that you 
> compile.  In your case, you call a routine that throws, and it does; 
> the solution is to stop calling routines that throw.

Right. However, recompiling libsupc++ with -fno-exceptions should do the 
trick, in principle...
(not that I'm suggesting that ;)

Paolo.


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