[LLVMbugs] [Bug 15507] New: warn about signed, unsigned arithmetic
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 13 14:21:42 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15507
Bug ID: 15507
Summary: warn about signed, unsigned arithmetic
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: eric.huhtala at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
It would be nice to have a warning about signed vs. unsigned arithmetic, e.g.
the following:
int s = -1;
unsigned int u = 2;
signed d = u / s;
std::cout << d << std::endl; // prints '0', not '-2' as some might expect.
--
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/20130313/1bc5b886/attachment.html>
More information about the llvm-bugs
mailing list