[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(1 << -1) ?



I've noticed a difference in the semantics between gcc-2.95 and gcc-3.0
on i386 and the cris-1.15 version of gcc-2.96.

This lines:
printf("%u\n", 1<<(-1));
gives 0 the cris and 2147483648 on i386.

Since gcc gives a warning about this, I assume the result
is undefined in the ISO C standard, is that correct or
is there a bug in the cris version of gcc?

Regards,
/Sebastian
-- 
                             .oooO o,o Oooo.
                             (   ) \_/ (   )      (o_
"Life is not fair, but root   \ (  /|\  ) / (o_   //\
password helps!" -- The BOFH   \_)     (_/  (/)_  V_/_