Consider: #include <iostream>
int main() { if(true) try {} catch(int) {} else std::cout << "bla\n"; } When compiled without -fno-exceptions, "bla" is not printed (which is correct). When compiled /with/ -fno-exceptions, "bla" /is/ printed (which is not correct). This appears to be due to the following overly simplistic definitions in libsupc++/exception_defines.h: #ifndef __EXCEPTIONS // Iff -fno-exceptions, transform error handling code to work without it. # define try if (true) # define catch(X) if (false) -- Summary: -fno-exceptions breaks simple if-statement. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc-bugzilla at contacts dot eelis dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36032