This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]