This is the mail archive of the 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: formats and syslog question

On Sat, 14 Sep 2002, Marc Espie wrote:

> On Sat, Sep 14, 2002 at 11:45:50AM +0100, Joseph S. Myers wrote:
> > Duplication of a table and the consequent risk of divergence between the
> > two similar but different tables, both of which now need to be maintained.
> This can be handled easily, by not using cut&paste but programming the copy 
> instead. Acceptable ?

I suggest the alternative syntax
__attribute__ ((__format__(__printf__, 2, 3, __nopedantic__)))
to disable all pedantic checking of that format applied to that function, 
which has some potential of other uses.  (Clearly a syslog format 
shouldn't give pedantic warnings for %C or %S or the ' flag or $ formats, 
as well as %m; but if treated as a separate format from printf it 
shouldn't give pedantic warnings for other extensions either since it's 
none of -pedantic's business to warn for features outside a standard other 
than ISO C/C++.  Treating syslog formats as entirely separate from the 
existing four types supported implies -pedantic should not be concerned 
with them any more than it is with GNU extensions to strfmon formats at 

Joseph S. Myers

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