libstdc++ uses __EXCEPTIONS to determine wither exceptions are available, and uses __GXX_RTTI to determine if RTTI is available. __EXCEPTIONS is ambiguous; it can mean either "generate cleanups on exception unwind paths" or "allow C++ exception handling syntax", and some compilers allow these flags to be set independently. It would be more portable (and would set a better example) to use __cpp_exceptions and __cpp_rtti rather than these macros, now that GCC supports them.
I don't think it matters as libstdc++ is only designed to be compiled with gcc. In fact if used with another compiler, the runtime exception no longer applies.
A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process. so I think you're wrong on this, the runtime exception can be used even when code is compiled by other compilers, if they aren't based on GCC.
There is no reason not to make this change, __cpp_exceptions is the portable, WG21-recommended way to tell if the compiler supports try/catch.
Author: redi Date: Fri Dec 12 15:58:49 2014 New Revision: 218679 URL: https://gcc.gnu.org/viewcvs?rev=218679&root=gcc&view=rev Log: PR libstdc++/64276 * doc/doxygen/user.cfg.in: Define __cpp_exceptions and __cpp_rtti. * doc/html/manual/using_exceptions.html: Regenerate. * doc/xml/manual/using_exceptions.xml: Use SD-6 feature-testing macros, __cpp_exceptions and __cpp_rtti, instead of __EXCEPTIONS and __GXX_RTTI. * include/bits/c++config: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/shared_ptr_base.h: Likewise. * include/debug/formatter.h: Likewise. * include/experimental/any: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/std/functional: Likewise. * include/tr1/functional: Likewise. * include/tr1/shared_ptr.h: Likewise. * libsupc++/eh_call.cc: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/exception_defines.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/guard.cc: Likewise. * libsupc++/pbase_type_info.cc: Likewise. * libsupc++/pointer_type_info.cc: Likewise. * libsupc++/vterminate.cc: Likewise. * src/c++11/thread.cc: Likewise. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/doc/doxygen/user.cfg.in trunk/libstdc++-v3/doc/html/manual/using_exceptions.html trunk/libstdc++-v3/doc/xml/manual/using_exceptions.xml trunk/libstdc++-v3/include/bits/c++config trunk/libstdc++-v3/include/bits/locale_classes.tcc trunk/libstdc++-v3/include/bits/shared_ptr.h trunk/libstdc++-v3/include/bits/shared_ptr_base.h trunk/libstdc++-v3/include/debug/formatter.h trunk/libstdc++-v3/include/experimental/any trunk/libstdc++-v3/include/ext/rope trunk/libstdc++-v3/include/ext/ropeimpl.h trunk/libstdc++-v3/include/std/functional trunk/libstdc++-v3/include/tr1/functional trunk/libstdc++-v3/include/tr1/shared_ptr.h trunk/libstdc++-v3/libsupc++/eh_call.cc trunk/libstdc++-v3/libsupc++/eh_personality.cc trunk/libstdc++-v3/libsupc++/exception_defines.h trunk/libstdc++-v3/libsupc++/exception_ptr.h trunk/libstdc++-v3/libsupc++/guard.cc trunk/libstdc++-v3/libsupc++/pbase_type_info.cc trunk/libstdc++-v3/libsupc++/pointer_type_info.cc trunk/libstdc++-v3/libsupc++/vterminate.cc trunk/libstdc++-v3/src/c++11/thread.cc
Done.