This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13123] New: -Wformat doesn't detect printf() format mismatches in C++ code
- From: "jthorn at aei dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Nov 2003 12:11:52 -0000
- Subject: [Bug c++/13123] New: -Wformat doesn't detect printf() format mismatches in C++ code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The printf() format mismatch in the following program is warned about when
compiling with gcc -Wformat, but not when compiling with g++ -Wformat:
#include <stdio.h>
void foo()
{
int i;
printf("%g\n", i);
}
I will attach the output of gcc -v -save-temps -Wformat -c
and g++ -v -save-temps -Wformat -c on this file.
--
Summary: -Wformat doesn't detect printf() format mismatches in
C++ code
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jthorn at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-unknown-openbsd3.3
GCC host triplet: i386-unknown-openbsd3.3
GCC target triplet: i386-unknown-openbsd3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13123