[Bug libstdc++/25191] exception_defines.h #defines try/catch

hhinnant at apple dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 11 16:10:00 GMT 2006



------- Comment #24 from hhinnant at apple dot com  2006-01-11 16:10 -------
(In reply to comment #23)
> You forgot to mentin that -fno-exceptions is neither mandated, nor
> required to work with programs that play tricks with try/catch.
> So, your assertion is unfounded.

The demo program does not play tricks with try/catch.  It uses the identifier
"try" in a completely conforming manner.

What subset of C++ programs do we expect to work under -fno-exceptions?  And
where is that documented?  The only thing I can find in our documentation that
addresses my question is:

>You may also wish to disable this option if you are compiling older
>C++ programs that don't use exception handling. 

My demo is exactly that:  A C++ program that does not use exception handling
(and yet is still conforming).  And gcc (without libstdc++) handles it just
fine.

Where do we document that some, but not all libstdc++ headers change the
semantics of -fno-exception (as gcc documents it) and may render some
conforming C++ programs broken?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191




More information about the Gcc-bugs mailing list