This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/41007] incorrect unsigned long long left/right shift
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2009 10:38:49 -0000
- Subject: [Bug c/41007] incorrect unsigned long long left/right shift
- References: <bug-41007-18037@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-08-08 10:38 -------
Shifting by more than the bitsize of the value invokes undefined behavior
(GCC implements shift count truncation for targets that would do this in
hardware which is why you see 5 as result).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41007