[PATCH] Remove NOTHROW from {,v}{,f}{print,scan}f, {,f}printf_unlocked and __{,v}{,f}printf_chk builtins

Mark Mitchell mark@codesourcery.com
Tue Sep 4 16:30:00 GMT 2007

Jakub Jelinek wrote:

> In glibc the following functions aren't throw(), because they are
> possible cancellation points (when a thread doing say a write within
> fprintf is cancelled, we need forced unwinding to work).

Can we conditionalize this in some way?  On a system without threads, or
if the user is explicitly writing single-threaded code, these functions
are in fact nothrow.  On an embedded C++ system, we don't want to pay
the overhead for thinking that every call to these functions might throw
an exception.


Mark Mitchell
(650) 331-3385 x713

More information about the Gcc-patches mailing list