[LLVMbugs] [Bug 15507] warn about signed, unsigned arithmetic
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 13 14:28:46 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15507
Matt Beaumont-Gay <matthewbg at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #1 from Matt Beaumont-Gay <matthewbg at google.com> ---
$ clang -Wsign-conversion -x c++ -fsyntax-only - <<EOF
void f() {
int s = -1;
unsigned int u = 2;
signed d = u / s;
}
EOF
<stdin>:4:14: warning: implicit conversion changes signedness: 'unsigned int'
to 'int' [-Wsign-conversion]
signed d = u / s;
~ ~~^~~
<stdin>:4:16: warning: implicit conversion changes signedness: 'int' to
'unsigned int' [-Wsign-conversion]
signed d = u / s;
~ ^
2 warnings 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/20130313/5164ec3e/attachment.html>
More information about the llvm-bugs
mailing list