This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15338] There should be a __format__ attribute for syslog.
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jan 2017 04:28:37 +0000
- Subject: [Bug c/15338] There should be a __format__ attribute for syslog.
- Auto-submitted: auto-generated
- References: <bug-15338-4@http.gcc.gnu.org/bugzilla/>
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");
^