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: Use of -fno-exceptions



> We use gcc 2.95.3.
> To save space in our very large build we use  -fno-exceptions.
> Now, a colleague says he needs exceptions in one, localized class. Is it
> safe to just compile this class/file (but no other) with the
> default -fexceptions ?

The exceptions support is needed to do a cleanup.  When an exception
is thrown, the stack gets popped one frame at a time and destructors
are called, up to the point where the exception is caught.  For this
to work properly, every possible call site that could be involved
would need to be compiled with exceptions enabled.  You may be able
to make a mixed environment work, but it will be tricky and perhaps
unstable.


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