This is the mail archive of the gcc@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]

Re: Need help understanding decl_handle_format_arg_attribute


First of all, thanks for the very quick response.

* Joseph S. Myers (jsm28@cam.ac.uk) [20010809 13:44]:

> Examining gcc.log from a testsuite run should show examples of all
> diagnostics c-format.c can generate and where to find testcases for them.

Ah yes, forgot about that.
 
> In __attribute__((format_arg(4))), 4 is the operand number.  This must be
> an integer constant expression.  For example,
> __attribute__((format_arg(foo))) is invalid.

Thanks for the explanation. But could we possibly change the message to
make it a bit less cryptic? Someting like:

  error("operand number for format string, passed to format_arg, is invalid")

This would make it IMHO much easier to understand the error.

Philipp


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