This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/9502: shift of long long broken
- From: Andrew Pinski <apinski at apple dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 29 Jan 2003 18:46:00 -0000
- Subject: Re: c/9502: shift of long long broken
- Reply-to: Andrew Pinski <apinski at apple dot com>
The following reply was made to PR c/9502; it has been noted by GNATS.
From: Andrew Pinski <apinski@apple.com>
To: roger.dahl@am.sony.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/9502: shift of long long broken
Date: Wed, 29 Jan 2003 10:37:29 -0800
The warning is right, 1 is not a long long but just an int.
Use C99 way of say 1 is a long long by LL.
Thanks,
Andrew Pinski
On Wednesday, Jan 29, 2003, at 10:13 US/Pacific, roger.dahl@am.sony.com
wrote:
>
>> Number: 9502
>> Category: c
>> Synopsis: shift of long long broken
>> Confidential: no
>> Severity: serious
>> Priority: medium
>> Responsible: unassigned
>> State: open
>> Class: sw-bug
>> Submitter-Id: net
>> Arrival-Date: Wed Jan 29 18:16:00 UTC 2003
>> Closed-Date:
>> Last-Modified:
>> Originator: roger.dahl@am.sony.com
>> Release: 3.2 and 2.96
>> Organization:
>> Environment:
> DJGPP MS-DOS (3.2), GCC Linux (2.96)
>> Description:
> Shift in assignment fails when type is long long and shift argument is
> > 31
>> How-To-Repeat:
> unsigned long long int a = 1 << 32;
>
> Note the compiler warning message and the resulting code.
>> Fix:
> unsigned long long int a = 1;
> a <<= 32;
>> Release-Note:
>> Audit-Trail:
>> Unformatted:
>