This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove NOTHROW from {,v}{,f}{print,scan}f, {,f}printf_unlocked and __{,v}{,f}printf_chk builtins
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 04 Sep 2007 09:30:09 -0700
- Subject: Re: [PATCH] Remove NOTHROW from {,v}{,f}{print,scan}f, {,f}printf_unlocked and __{,v}{,f}printf_chk builtins
- References: <20070903094744.GS2063@devserv.devel.redhat.com>
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