This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
"format not a string literal"
- To: gcc-bugs at sourceware dot cygnus dot com
- Subject: "format not a string literal"
- From: Ulrich Drepper <drepper at cygnus dot com>
- Date: 10 Oct 1999 22:14:37 -0700
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
Its must be a recent addition since I haven't seen it before. The
current CVS gcc emits
warning: format not a string literal, argument types not checked
Please remove this again. This warning is useless and it increases
the noice level. If some call to a function marked with the 'printf'
or `scanf' attribute has no string literal in this position this can
very well be intended. E.g., in the glibc implementation this happens
all over the place for functions like
__STDIO_INLINE int
vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW
{
return vfprintf (stdout, __fmt, __arg);
}
This now provokes a warning. This is really bad since there is no way
to prevent this.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------