This is the mail archive of the
mailing list for the GCC project.
Re: Mark va_start as nothrow
On Fri, Apr 17, 2009 at 5:43 AM, Mark Mitchell <firstname.lastname@example.org> 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
on non-local binding functions anyway. At least the nothrow attribute
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.