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

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Fri Dec 2 19:23:00 GMT 2005



------- Comment #7 from gdr at integrable-solutions dot net  2005-12-02 19:23 -------
Subject: Re:  exception_defines.h #defines try/catch

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Confirmed.  This also causes problems in normal C++ code which does:
| 
| #include <string>
| 
| int f(void);
| int main(void)
| {
|   try {
|   f();
|   }catch (a) {}
| }
| 
| Without the include, you get an error but with the include, you don't which
is
| inconstaint behavior.

Indeed.  But that is not changing a valid code into something else as
you claimed earlier.

The use of try/catch is part of the contract of -fno-exceptions. If a
determined programmer decides to abuse them beyond reasons, then I
believe he/she gets what he/she gets.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191



More information about the Gcc-bugs mailing list