https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88860

--- Comment #5 from Jonny Grant <jg at jguk dot org> ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Jonny Grant from comment #1)
> > --- a/gcc/doc/extend.texi
> > +++ b/gcc/doc/extend.texi
> > @@ -9353,6 +9353,13 @@ __attribute__((noreturn)) void d0 (void),
> >  the @code{noreturn} attribute applies to all the functions
> >  declared; the @code{format} attribute only applies to @code{d1}.
> >  
> > +@noindent
> > +The following __attribute__ causes gcc to check run printf argument checks
> 
> "check run printf argument checks"
> 
> 
> > on argument '3' which is 'const char * string format' (when visible at
> > compile time), against argument '4' the '...' variadic ellipsis.  In the
> > example below, arguments '1' and '2' are not checked.
> > +
> > +@smallexample
> > +void string_format(const char * prefix, size_t line, const char * const
> > format, ...) __attribute__ ((format (printf,3,4)));
> > +@end smallexample
> 
> 
> This argument seems to be documenting the effects of the printf attribute,
> not attribute syntax. Why would it belong on this page?

You're right, I found this page with an example that is fine

https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Function-Attributes.html#Common-Function-Attributes

Re the patches, I recall I did email them, but pasted here too as another
developer was doing that. I'll have a good read of that contribution guide.

What did you think of the "infelicities" patch?
Thanks

Reply via email to