------- Comment #59 from l dot lunak at suse dot cz 2008-09-25 09:56 ------- (In reply to comment #58) > >> It seems reasonable to me for try { X } catch... to mean X when > >> -fno-exceptions. We don't need to error except on throw. > > > > It seems unreasonable to me that gcc would silently modify code's behaviour, > > The change I was talking about doesn't modify behavior. If there are no > exceptions, catch blocks will never be executed, so we can optimize them > away in the presence of -fno-exceptions.
But only in your perfect world. This bug and its silent discarding of exception handling code (and an unintended -fno-exception from the build system) made us release a broken package. If you want to add support for discarding of explicitly written exceptions code, ok, whatever, but please make it explicit, because having it the way it is with this bug is rather pointless (since then either you don't use exceptions at all and then there's no need to write the exception handling code, or you mix it and then you soon may find it simpler to drop the -fno-exception rather than explicitly check all code paths after you refactor something). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191