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: Mark va_start as nothrow


On Fri, Apr 17, 2009 at 5:43 AM, Mark Mitchell <mark@codesourcery.com> wrote:
> Jan Hubicka wrote:
>
>> I think it is safe to mark them nothorw. ?With -fnon-call-exceptions
>> they can theoretically be given bad pointer,
>
> Good point!
>
>> but other similar
>> functions that can ICE are already marked NOTHROW (such as sprintf).
>> Or if this is not true, I can probably add ATTR_NONTRHOW_FOR_NCE_LIST
>
> I think we should do that. ?Otherwise, -fnon-call-exceptions is broken.
> ?It sounds like we already have a problem, but we should try to avoid
> making it worse.

I think for -fnon-call-exceptions we have to disregard possible
nothrow attributes
on non-local binding functions anyway.  At least the nothrow attribute
documentation
does not mention possible interactions with -fnon-call-exceptions.

Thus for our builtins we have to distinguish the cases where we have to drop
nothrow in the face of -fnon-call-exceptions and where not.  Of course we
rely on implementation details here as nearly all functions could eventually
end up allocating memory and thus throw.

Richard.


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