Remove -fexceptions configure test
Joseph Myers
joseph@codesourcery.com
Thu Oct 15 23:28:00 GMT 2015
On Thu, 15 Oct 2015, Roland McGrath wrote:
> What is the reason for -fexceptions in all those other places? If
> each is actually a uses-callbacks case, then we should use that
> variable to clarify that in the documentation. I think that's the
> actual case for all the stdio cases, because they can lead to
> callbacks via _IO_JUMPS.
>
> Do we have any -fexceptions cases that are not actually uses-callbacks?
I think:
* If a function may be cancelled, it needs -fexceptions. This includes
most functions doing I/O unless explicitly using non-cancellable I/O
functions.
* If the cancellation may occur from within an inline asm, not just at
function call points, -fasynchronous-unwind-tables is needed as well.
(I'm not sure what's going on with the few files using
-fasynchronous-unwind-tables without -fexceptions.)
* If a function uses callbacks, it needs -fexceptions (both because the
callbacks might use interfaces that can be cancelled, and also because
they might throw exceptions).
* For all of the above, __THROW must not be used.
More than one of the above may apply to a function. I don't know what
makes sense regarding makefile variables in such cases (I/O and callbacks,
for example). And I don't know if we actually intend to allow exceptions
to be thrown and cancellation to occur for arbitrary callbacks.
(snprintf is marked __THROWNL - but custom printf handlers can be
registered.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list