[llvm-bugs] [Bug 36008] New: Regression (r316268): erroneous -Wsign-compare for typeof(enum T) and typeof(enumValue)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 18 15:18:45 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36008

            Bug ID: 36008
           Summary: Regression (r316268): erroneous -Wsign-compare for
                    typeof(enum T) and typeof(enumValue)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arphaman at gmail.com
                CC: llvm-bugs at lists.llvm.org

In LLVM 6 Clang reports -Wsign-compare:

comparison of integers of different signs: 'typeof (lhs)' (aka 'enum EnumTest')
and 'typeof (kValue)' (aka 'int')

For the following sample:

enum EnumTest {
    kValue = 0,
};


void foo(enum EnumTest lhs) {
  __typeof__(lhs) x = lhs;
  __typeof__(kValue) y = kValue;
  x == y;  
}


This is a regression after r316268.

-- 
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/20180118/5b7d4b79/attachment.html>


More information about the llvm-bugs mailing list