[llvm-bugs] [Bug 38950] New: Warning for unary minus used with unsigned type
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 14 07:23:06 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38950
Bug ID: 38950
Summary: Warning for unary minus used with unsigned type
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: david.bolvansky at gmail.com
CC: llvm-bugs at lists.llvm.org
unsigned foo()
{
unsigned a = 1;
return -a;
}
Clang issues no warning.
MSVC produces
<source>(8): warning C4146: unary minus operator applied to unsigned type,
result still unsigned
--
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/20180914/2b3591d1/attachment.html>
More information about the llvm-bugs
mailing list