This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/25191] exception_defines.h #defines try/catch
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2008 23:08:35 -0000
- Subject: [Bug libstdc++/25191] exception_defines.h #defines try/catch
- References: <bug-25191-11686@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #47 from sebor at roguewave dot com 2008-06-02 23:08 -------
(In reply to comment #46)
[...]
> 2) -ftransform-exceptions
should catch(X) expand into "else if (false)" rather than just "if (false)?"
That said, I don't think there is a way to do this using the preprocessor
alone. Consider that
try { foo (); }
catch (SomeException ex) {
puts (ex.what ());
}
will preprocess to:
try { foo (); }
if (false) {
puts (ex.what ()); // <<< ex undefined
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191