[LLVMbugs] [Bug 2843] New: llvm-gcc has -Wformat-nonliteral on by default, can' t switch it off
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Sep 29 13:47:01 PDT 2008
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: unassignedbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: rafael.espindola at gmail.com, llvmbugs at cs.uiuc.edu
$ 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.
More information about the llvm-bugs
mailing list