[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] odd left-shift behavior, avr-gcc 4.1.2
From: |
John Regehr |
Subject: |
Re: [avr-gcc-list] odd left-shift behavior, avr-gcc 4.1.2 |
Date: |
Sun, 9 Dec 2007 16:30:03 -0700 (MST) |
> operand." I believe this means that the result of the shift in your
> example is a uint16_t, so you get 0xfffe which is then promoted to an
> int32_t on assignment to x.
Ok but notice that the same code gives a different result on x86-gcc. I
think this means that the only choices are: implementation defined
behavior, undefined behavior, or compiler bug.
John