This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: GCC 3.1.1


Andreas Schwab <schwab@suse.de> writes:
> Jack Lloyd <lloyd@acm.jhu.edu> writes:
>
> |> Basically:
> |>
> |> unsigned long long x;
> |> x = 1 << 32;
> |>
> |> results in x == 0 rather than 0x100000000 as the code expects.
>
> Actually this is already undefined by itself, and even x == 0 is not
> guaranteed.

why? x is an unsigned long long, surely << should be defined for values up to 63
for this implementation?

Rob Taylor


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]