[LLVMbugs] [Bug 9987] New: -Wextra overrides earlier -Wno-sign-compare
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun May 22 15:02:31 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9987
Summary: -Wextra overrides earlier -Wno-sign-compare
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Driver
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: joerg at NetBSD.org
CC: llvmbugs at cs.uiuc.edu
For GCC, the -Wall and -Wextra (aka -W) options are supposed to set the warning
defaults and -Wno-* can be used to disable options again. This doesn't work as
expected with clang.
Consider the following input:
int main(void)
{
int a = 0;
unsigned int b = 1;
return a < b ? 1 : 2;
}
clang -Wextra -Wno-sign-compare -c test.c
is silent.
clang -Wno-sign-compare -Wextra -c test.c
warns, when it should be silent (and the diagnostic message is kind of
confusion).
GCC doesn't warn in either case.
--
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