This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34873] varasm.c:3387: warning: right shift count >= width of type
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2008 23:08:50 -0000
- Subject: [Bug c/34873] varasm.c:3387: warning: right shift count >= width of type
- References: <bug-34873-11811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-01-21 23:08 -------
This is the code:
const int shift = sizeof (hashval_t) * CHAR_BIT;
const int n = sizeof (HOST_WIDE_INT) / sizeof (hashval_t);
int i;
h ^= (hashval_t) hwi;
for (i = 1; i < n; ++i)
{
hwi >>= shift;
h ^= (hashval_t) hwi;
}
This code is dead if sizeof (HOST_WIDE_INT) == sizeof (hashval_t).
This is a bug in the 4.1.2 you are using and not in the current sources.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c
Version|4.3.0 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34873