This is the mail archive of the gcc-bugs@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]

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



------- 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


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