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

           Summary: MCAssembler uses values outside of enum range
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Reported by g++-4.5.  Note that gcc passes like VRP know that enum values
are in range, and if they are not (like here) then you may get a miscompile.

lib/MC/MCAssembler.cpp: In function 'unsigned int
getFixupKindLog2Size(llvm::MCFixupKind)':
lib/MC/MCAssembler.cpp:57:3: warning: case value '129' not in enumerated type
'llvm::MCFixupKind'
lib/MC/MCAssembler.cpp:61:3: warning: case value '130' not in enumerated type
'llvm::MCFixupKind'
lib/MC/MCAssembler.cpp: In function 'bool isFixupKindPCRel(llvm::MCFixupKind)':
lib/MC/MCAssembler.cpp:71:3: warning: case value '129' not in enumerated type
'llvm::MCFixupKind'
lib/MC/MCAssembler.cpp:73:3: warning: case value '130' not in enumerated type
'llvm::MCFixupKind'


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