This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13050] New: RFE: Support for implementation-specific format specifiers in format string warnings
- From: "jonwil at tpgi dot com dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2003 13:45:07 -0000
- Subject: [Bug c/13050] New: RFE: Support for implementation-specific format specifiers in format string warnings
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC will warn about invalid format specifiers in format strings with printf and
similar functions. However, the list of format specifiers that GCC warns about
is the specific list given in the ANSI/ISO C standard. However, many runtime
libraries (including the runtime library used on the MingW target, which is the
standard windows C runtime from Microsoft) support extra format specifiers (for
example, the Microsoft runtime supports %wZ for printing out a special kind of
string used by the windows kernel). Basicly, this is a request for a feature
(perhaps in the SPEC file) to enable specific implementations to add/modify the
list of which format specifiers GCC will warn about.
I do know that you can turn the warning off with -Wno-format but that defeats
the purpose of format argument validation.
Directly related to this would be a way to specify that a particular function
(and argument to that function) should be interpereted as a format specifier
string and checked as such.
--
Summary: RFE: Support for implementation-specific format
specifiers in format string warnings
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jonwil at tpgi dot com dot au
CC: gcc-bugs at gcc dot gnu dot org,jonwil at tpgi dot com
dot au
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13050