http://llvm.org/bugs/show_bug.cgi?id=2843

           Summary: llvm-gcc has -Wformat-nonliteral on by default, can't
                    switch it off
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED], [email protected]


$ cat foo.cpp
#include <stdio.h>

extern const char *foo();

int main(void) {
  const char *the_string = foo();
  printf(the_string);
}
$ llvm-g++ -c foo.cpp -Wno-format-nonliteral
foo.cpp: In function ‘int main()’:
foo.cpp:7: warning: format not a string literal and no format arguments
$ g++ -c foo.cpp
$

GCC will pick it up with -Wformat -Wformat-nonliteral, or -Wall
-Wformat-nonliteral, but llvm-gcc picks it up always.

In my case, this is worsened by being combined with -Werror ...


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to