------- Comment #67 from mmitchel at gcc dot gnu dot org 2008-11-20 17:55 ------- I think that the current libstdc++ behavior is undesirable, for the reasons that Howard says. In particular, the fact that including a libstdc++ header can result in definitions of "try" and "catch" as macros is bad, even though, of course, that happens only in the -fno-exceptions mode. I find comments about exceptions being a standard part of the language unpersuasive; while that is of course true, G++ is certainly used by people who wan the "C++ without exceptions" language and not supporting that well would put us at a competitive disadvantage relative to other C++ compilers.
I think that changing libstdc++ to use __try, __catch, etc. is reasonable. That's certainly the approach used in other libraries. However, I also think Jason's patch is reasonable, provided of course that the documentation is updated to reflect this new behavior. If I recall correctly, unwinding into a frame with no EH data will cause a runtime abort, so programs will not silently skip catch clauses that have been compiled away. The program may fail, but at least it will not do so silently. Jason, is that correct? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191