------- Comment #73 from jason at redhat dot com 2008-11-23 00:02 -------
Subject: Re: exception_defines.h #defines try/catch
pinskia at gcc dot gnu dot org wrote:
> I think this patch will not handle:
> int main(void)
> {
> try {
> }catch (int &a)
> {
> a = 1;
> }
> }
Ah yes, I probably still need to push the declaration of a.
> I am working on a patch which adds -fignore-exceptions which has to be used
> with -fno-exceptions which handles this correctly.
This sounds like the wrong approach to me. libstdc++ needs to work with
or without -fno-exceptions, it shouldn't require another flag. And I
don't see the point in allowing 'throw expr;' under -fno-exceptions; I
don't think the compiler can come up with another error reporting
mechanism by itself.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191