This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/7139: Shifting 1 through a 64bit int fails at 32bit line
- From: Simon Shapiro <shimon at nomis-storage dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Simon Shapiro <shimon at nomis-storage dot com>, mmitchel at gcc dot gnu dot org <mmitchel at gcc dot gnu dot org>, gcc-bugs at gcc dot gnu dot org <gcc-bugs at gcc dot gnu dot org>, gcc-prs at gcc dot gnu dot org <gcc-prs at gcc dot gnu dot org>, nobody at gcc dot gnu dot org <nobody at gcc dot gnu dot org>, shimon at simon-shapiro dot com <shimon at simon-shapiro dot com>, gcc-gnats at gcc dot gnu dot org <gcc-gnats at gcc dot gnu dot org>
- Date: Mon, 01 Jul 2002 19:59:37 +0100
- Subject: Re: c/7139: Shifting 1 through a 64bit int fails at 32bit line
-------------------
>
>
> --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.