http://llvm.org/bugs/show_bug.cgi?id=8142

           Summary: implement -Wenum-compare
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Clang does not emit a warning on this code:

  enum X { Ax, Bx };
  enum Y { Ay, By };

  int foo(enum X x, enum Y y) {
    return x == y;
  }

while GCC does:

  enum.cc: In function ‘int foo(X, Y)’:
  enum.cc:5: warning: comparison between ‘enum X’ and ‘enum Y’

This is under -Wenum-compare in GCC.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to