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: Preliminary mainline patch for __attribute__ ((sentinel))


On Sun, 29 Aug 2004, Kaveh R. Ghazi wrote:

> Here's the testcase I wrote as gcc.dg/format/sentinel-1.c.  I'm
> wondering whether we should accept or reject the attribute on `foo2'
> and `foo3' below.  Currently they are both accepted.

For foo2 (where the error for having (...) is an error, not a warning; 
dg-error and dg-warning don't distinguish at present, but hopefully some 
day they will) I don't think it particularly matters.  For foo3 the code 
is erroneous as well since the unprototyped function can't be compatible 
with a variadic one; for a new attribute I'd be inclined to be strict and 
at least warn when it is applied to an unprototyped function.  (It might 
still be useful to keep the attribute after that warning and warn for bad 
calls to the function.)

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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