This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/25191] exception_defines.h #defines try/catch
- From: "hhinnant at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2005 21:21:40 -0000
- Subject: [Bug libstdc++/25191] exception_defines.h #defines try/catch
- References: <bug-25191-11686@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from hhinnant at apple dot com 2005-12-02 21:21 -------
(In reply to comment #10)
> (In reply to comment #9)
> > Not being someone with a lot of FE experience, I have more hesitation about this latter approach.
>
> That solution still does not solve my issue of the diagnostic issue.
Doesn't it? try/catch is no longer #defined, and client code will get a
diagnostic if it uses try/catch with -fno-exceptions (only the system headers
get special treatment by the FE). That's what we want, right?
>
> We really should not be defining keywords in the headers at all. If we define
> bool somewhere to be int, we would get incorrect behavior the same way we are
> getting for try/catch.
>
<nod> That's always been a golden rule that has worked well for me (after
learning it the hard way many moons ago ;-) ).
-Howard
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191