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: dcough...@apple.com
          Reporter: david.bolvan...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to