Hi!
On 02/11/13 19:22, Mischa Baars wrote:
On 11/02/2013 08:17 PM, Jonathan Wakely wrote:
On 2 November 2013 18:57, Mischa Baars wrote:
*I understand, however it seems more logical to use the destination
type to **
**determine the type of the first and second operand. *
No. No it does not.
Are you completely sure this is the desired behaviour?
*It's the behaviour required by the C standard*, so yes, it is
absolutely desirable that GCC does that.
*The literal 1 has a fixed type and the literal 31 has a fixed type, **
**and the expression (1<<31) has a fixed type. Whether you assign the **
**result to a different type does not alter those types involved in
the **
**expression. *
This
Wow, that sounds pretty stupid for a standard again :)
There is such a vast amount wrong with this I am not sure where to start.
Please finish chapter one of whatever book you are reading. It was wrong
to make you feel fit to comment on this behavior.
Thanks.
Alec