This is the mail archive of the
mailing list for the libstdc++ project.
Re: patch: <bits/localefwd.h> with -fno-exceptions
>>>>> "Mark" == Mark Mitchell <email@example.com> writes:
Benjamin> preserved the integrity and flow of the v3 code in
Benjamin> question. I think I proposed something that is sane.
> There are other approaches. For example,
> #if NO_EXCEPTIONS
> #define try if (true)
> #define catch(x) if (false)
> This works because try and catch blocks are always enclosed in
Yes. I actually think the SGI approach, namely __STL_TRY and __STL_UNWIND,
is pretty clean and reasonable.
Benjamin> Reasonable people may disagree. Frankly, I'm surprised
Benjamin> Jason agreed.
> Me, too. England is making him soft. :-)
Me, too, actually. I started to loudly disagree, and then thought about it
IMO, -fno-exceptions should not mean "expunge chapter 15 from the subset of
C++ supported", it should mean "nothing in this file can throw". Then the
existing nothrow optimization can go through and discard all the catch
blocks and cleanups. Or we can simply avoid generating them in the first
place if -fno-exceptions.
Benjamin> I'm not trying to be difficult, but is there any way I
Benjamin> can get you to explain what you think -fno-exceptions
Benjamin> should do? Can we start with what the current behavior
> You're not being difficult, and yes. :-) I think it should do exactly
> what --no_exceptions does in EDG, namely disable all support for
> exception handling, and issue a hard error when any attempt to use it
> is made.
Well, I strongly disagree about throw specs. And somewhat less strongly
disagree about try/catch, as above. I agree that throws should be a hard