[LLVMbugs] [Bug 9521] New: No warning when comparing differing enum types

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 21 09:48:26 PDT 2011


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

           Summary: No warning when comparing differing enum types
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tjw at omnigroup.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6350)
 --> (http://llvm.org/bugs/attachment.cgi?id=6350)
example

At some point, clang started warning when passing arguments of one enum type
into a function taking a differing enum type. But, if enum types are going to
be considered different to this extent, then comparison of values/variables of
differing enum types should warn too (and don't as of r128001).

See the attached example that calls out a few constructs that should warn but
don't (certainly not exhaustive).

-- 
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.



More information about the llvm-bugs mailing list