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++/13123] New: -Wformat doesn't detect printf() format mismatches in C++ code


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


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