http://llvm.org/bugs/show_bug.cgi?id=9920
Summary: Another case of unnecessary "shift count is negative"
warning
Product: new-bugs
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=6598)
--> (http://llvm.org/bugs/attachment.cgi?id=6598)
Trigger unneeded "shift count is negative" warning
[Creating this as a separate PR.]
This warning still appears while compiling the FreeBSD kernel source tree, even
with ToT, as reported to me by Matthew Fleming. I just tested a further
reduced version of his sample with trunk r131368, and it gives:
pr5544c.c:4:17: warning: shift count is negative
unsigned data = W1(1);
^~~~~
pr5544c.c:2:47: note: instantiated from:
(((_a) > 31 && (_a) < 64 ? (((unsigned) 1)<<((_a)-32)) : (unsigned) 0))
^ ~~~~~~~~~
1 warning generated.
Ted Kremenek said about this in bug 5544:
> The underlying problem is not that we don't prune these warnings on paths that
> can be shown to be dead. The problem here is that Clang doesn't know this
> branch is dead. The issue is how the CFG models || and && operations. That's
> worth tracking in a separate bug.
--
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