http://llvm.org/bugs/show_bug.cgi?id=9422
Summary: Fix for bug 5544 does not always work when -Werror is
in use
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
The fix for bug 5544, committed in r126762, does not seem to work
completely when using -Werror. The problem is not always triggered,
though; there should be some other warning, for example generated by a
higher warning level, e.g. using the same sample as in bug 5544:
$ clang -v
clang version 2.9 (trunk 127164)
Target: i386-unknown-freebsd9.0
Thread model: posix
$ clang -c pr5544.c
No warnings here, fine.
$ clang -Wextra -c pr5544.c
pr5544.c:9:22: warning: unused parameter 'argv' [-Wunused-parameter]
main(int argc, char *argv[])
^
1 warning generated.
Okay, that gives one warning, now let's turn on -Werror too:
$ clang -Wextra -Werror -c pr5544.c
pr5544.c:9:22: error: unused parameter 'argv' [-Werror,-Wunused-parameter]
main(int argc, char *argv[])
^
pr5544.c:13:24: error: shift count is negative [-Werror]
printf("%"PRIx64"\n", FOO(1));
^~~~~~
pr5544.c:6:48: note: instantiated from:
(((_a) > 63 && (_a) < 128 ? (((uint64_t) 1)<<((_a)-64)) : (uint64_t) 0))
^ ~~~~~~~~~
2 errors generated.
Now suddenly it has two errors, and it triggers on the unreachable code
anyway?
--
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