[PATCH/expand] PR64011 Adjust bitsize when partial overflow happen for big-endian

Jeff Law law@redhat.com
Wed Jan 14 06:42:00 GMT 2015


On 01/13/15 15:42, Joseph Myers wrote:
> On Tue, 13 Jan 2015, Jeff Law wrote:
>
>> In many ways having the compiler or assembler spitting out an error here is
>> preferable to silently compiling the code.  That would also help explain why
>
> As usual, an error is incorrect in such a case that only has undefined
> behavior at runtime (but it may be compiled into an abort if the behavior
> is unconditionally undefined, and the abort doesn't replace anything
> before the undefined behavior that might have stopped the undefined
> behavior from occurring).
You are, of course, correct.  We can't error here, but we can generate a 
conditional warning.

jeff



More information about the Gcc-patches mailing list