c/1017: -Wmissing-format-attribute gives too many warnings

Andreas Jaeger aj@suse.de
Fri Dec 8 12:36:00 GMT 2000


The following reply was made to PR c/1017; it has been noted by GNATS.

From: Andreas Jaeger <aj@suse.de>
To: "Joseph S. Myers" <jsm28@cam.ac.uk>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: c/1017: -Wmissing-format-attribute gives too many warnings
Date: 08 Dec 2000 21:14:30 +0100

 >>>>> Joseph S Myers writes:
 
  > On 8 Dec 2000, Andreas Jaeger wrote:
 >> >> extern void dbg_log (const char *str, ...)
 >> >> __attribute__ ((__format__ (__printf__, 1, 0)));
 
 >> It came from real code.  Inspired by your patch for syslog on
 >> libc-alpha, I added the format checking code to nscd/dbg_log.h - but
 >> it seems I misunderstood the GCC manual.  I'll change glibc now to use
 >> a 1 for the attribute.
 
  >  ... that should of course be (__printf__, 1, 2).
 It should - and that's what I checked in an hour ago.  I first send
 the email away and then fixed glibc correctly.
 
 Thanks for noticing,
 Andreas
 -- 
  Andreas Jaeger
   SuSE Labs aj@suse.de
    private aj@arthur.inka.de
     http://www.suse.de/~aj


More information about the Gcc-prs mailing list