From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 782 invoked by alias); 2 Jun 2008 23:09:18 -0000 Received: (qmail 718 invoked by uid 48); 2 Jun 2008 23:08:35 -0000 Date: Mon, 02 Jun 2008 23:09:00 -0000 Message-ID: <20080602230835.717.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/25191] exception_defines.h #defines try/catch In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sebor at roguewave dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00101.txt.bz2 ------- 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