
https://bugzilla.novell.com/show_bug.cgi?id=256642 Summary: STL redefines try and catch keywords Product: openSUSE 10.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: llunak@novell.com QAContact: qa@suse.de CC: dmueller@novell.com == testcase == #include <memory> void bar(); struct Foo; bool test() { try { bar(); } catch (Foo&) { return false; } return true; } == testcase == This testcase compiles without an error when compiled with -fno-exceptions, even though clearly it should not. The reason is /usr/include/c++/4.1.2/exception_defines.h which globally changes the keywords. Since compiling with exceptions has some costs associated, it makes sense to compile with -fno-exceptions and explicitly enable exceptions only for source that actually needs it. However, including any STL header effectively breaks this approach, as such places won't be found due to the missing compiler error. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.