[LLVMbugs] [Bug 18801] New: Regression: -Weverything does not include -Wwrite-strings
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 10 16:11:59 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18801
Bug ID: 18801
Summary: Regression: -Weverything does not include
-Wwrite-strings
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: chengniansun at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
-Weverything does not include -Wwrite-strings in the latest trunk 201113.
clang-3.4 works fine.
$: cat small.c
extern void fn(char*);
void fn1(void);
void fn1() {
fn("hello");
}
$: clang-trunk -Weverything -c small.c
$: clang-trunk -Wwrite-strings -c small.c
small.c:4:6: warning: passing 'const char [6]' to parameter of type 'char *'
discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
fn("hello");
^~~~~~~
small.c:1:21: note: passing argument to parameter here
extern void fn(char*);
^
1 warning generated.
$: clang-trunk --version
clang version 3.5 (trunk 201113)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$: clang-3.4 -Weverything -c small.c
small.c:4:6: warning: passing 'const char [6]' to parameter of type 'char *'
discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
fn("hello");
^~~~~~~
small.c:1:21: note: passing argument to parameter here
extern void fn(char*);
^
1 warning generated.
$:
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140211/1d1b1c45/attachment.html>
More information about the llvm-bugs
mailing list