Christian I agree with you, the cast should simply force the variable interpretation.
neo313 the point you exposed is reasonable, but if you look at the assembler code you will see that the comparison is made for unsigned interpretation (using jb and ja processor instructions), while without optimizations the comparison performed is for signed integers (processor instructions jg and jl) as should be. So, as stated by the rule, the implementation-defined result should be ignore the cast, but this action can happen only at compile time when the values are not defined yet. Acting this way the compiler should refuse to use the cast even for correct values. This makes no sense at all.
In my opinion this is a bug of the optimizer.