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

[Bug c/15338] There should be a __format__ attribute for syslog.


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-02-26 19:26:22         |2017-1-12
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |3.4.0, 4.5.3, 4.8.3, 4.9.3,
                   |                            |5.3.0, 6.3.0, 7.0

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
GCC 7.0 still complains about %m with -Wformat and -Wpedantic:

$ (set -x && cat b.c && for o in '' '-Wpedantic'; do gcc -S -Wformat $o b.c;
done)
+ cat b.c
#include <syslog.h>

void f (void)
{
  syslog (0, "%m");
}

+ for o in ''\'''\''' ''\''-Wpedantic'\'''
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -S -Wformat b.c
+ for o in ''\'''\''' ''\''-Wpedantic'\'''
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -S -Wformat -Wpedantic b.c
b.c: In function ‘f’:
b.c:5:16: warning: ISO C does not support the ‘%m’ gnu_printf format
[-Wformat=]
   syslog (0, "%m");
                ^

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