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:00:56 -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 #9 from hhinnant at apple dot com 2005-12-02 21:00 -------
(In reply to comment #8)
> Subject: Re: exception_defines.h #defines try/catch
>
> "hhinnant at apple dot com" <gcc-bugzilla@gcc.gnu.org> writes:
>
> | ------- Comment #5 from hhinnant at apple dot com 2005-12-02 19:07 -------
> | (In reply to comment #2)
> | > I'd rather you work around this in objective-c or objective c++.
> |
> | How? I'm open to suggestions.
>
> #undef them if you intend to include libstdc++ files and use try/catch
> with funny characters to mean something else with -fno-exceptions?
I'm sorry, I'm just not understanding what you're suggesting. If you could
expound on your suggestion I would be most appreciative. If it helps, here is
a demo file that I would like to have work with -fno-exceptions.
#include <list>
#include <vector>
#import <Cocoa/Cocoa.h>
#import "my_header.h" // may have contain ObjC @try/@catch
#include <iostream>
int main()
{
// ....
}
An alternative to my original suggested fix is to solve this problem in the FE
by parsing try/catch differently (e.g. as if they were if(true)/if(false)) in
system headers when -fno-exceptions. Then we could just get rid of
exception_defines.h, and still have pretty std::headers. Not being someone
with a lot of FE experience, I have more hesitation about this latter approach.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191