This is the mail archive of the gcc-bugs@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]

c/9502: shift of long long broken


>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:


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