[LLVMbugs] [Bug 8431] WinCOFFObjectWriter: warnings on GCC-4.6 for non enumerated case values.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 22 08:12:47 PDT 2010


Duncan Sands <baldrick at free.fr> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #3 from Duncan Sands <baldrick at free.fr> 2010-10-22 10:12:47 CDT ---
I don't think casting to unsigned is correct.  Fixup.getKind() returns a value
of type MCFixupKind.  Thus the only way it can contain one of the problematic
values (131, 132 or 133) is via undefined behaviour (AFAIK, putting a value
that does not belong to an enum type in a variable of that enum type results
in undefined behaviour).  Casting to unsigned is just papering over the fact
that it is invalid for Fixup.getKind() to return one of those values in the
first place.  Probably Fixup.getKind() should return an unsigned value.

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