c/7139: Shifting 1 through a 64bit int fails at 32bit line
Simon Shapiro
shimon@nomis-storage.com
Mon Jul 1 16:58:00 GMT 2002
-------------------
>
>
> --On Thursday, June 27, 2002 06:26:25 PM +0100 Simon Shapiro
> <shimon@nomis-storage.com> wrote:
>
> > Thax for looking into this problem.
> >
> > However, I would like to suggest that you may have dismissed the
> > problem a bit too quickly.
>
> No, I understood it.
>
> You need to take a look at the C standard.
>
> If ints have 32 bits, (1 << 32) has undefined behavior.
Great! Thanx.
Simon
>
> --
> Mark Mitchell mark@codesourcery.com
> CodeSourcery, LLC http://www.codesourcery.com
>
Sincerely,
Simon Shapiro, CEO
Nomis Storage, Inc.
More information about the Gcc-bugs
mailing list