This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] add -fno-exceptions support
- To: jason at cygnus dot com, libstdc++ at gcc dot gnu dot org, mark at codesourcery dot com
- Subject: Re: [v3] add -fno-exceptions support
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 14 Feb 2001 15:20:42 -0800
Sorry for the delay. When doing this the bits that were the most
confusing to me were the exception_support bits and where to put the
functexcept functions (in libsupc++ vs libstdc++, in namespace std vs
extern "C", etc)
Looking at the mods:
%grep functexcept *
exception_support.cc:#include <bits/functexcept.h>
new_op.cc:#include <bits/functexcept.h>
new_opnt.cc:#include <bits/functexcept.h>
vec.cc:#include <bits/functexcept.h>
1) vec.cc:
__cxa_vec_new2
- try/catch blocks
- __throw_exception_again
2) new_op.cc
- __throw_bad_alloc
3) new_opnt.cc
- try/catch blocks
4) exception_support.cc
- try/catch
- __throwXXX
- some stuff that's not needed for exceptions. Please double check
this file carefully jason.
To me, this indicates that you need the functexcept.h header to
correctly compile the runtime with -fno-exceptions. If not, please
post a patch on how to do it otherwise.
The other issue is __cxa_bad_cast vs. __throw_bad_cast.
The problem is that __cxa_bad_cast and __throw_bad_cast do pretty much
the same thing: it makes sense to consolidate this stuff. Which begs
the question, why do we have the __cxa_XXX versions? I don't see any
reference to these functions in the actual ABI document (although I
may be wrong--I'd expect to see them in 3.3.3)
If __cxa_bad_cast/__cxa_bad_typeid are required for the ABI, and I'm
wrong, can't we just extend to __cxa_out_of_range etc and have all
this stuff in one place? If not, can we consolidate on the __throw_XXX
versions?
I need help here folks.
-benjamin