This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/10319: shift right bug
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 6 Apr 2003 15:56:00 -0000
- Subject: Re: c/10319: shift right bug
- Reply-to: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
The following reply was made to PR c/10319; it has been noted by GNATS.
From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
To: jens dot harms at informatik dot uni-oldenburg dot de
Cc: gcc-gnats at gcc dot gnu dot org
Subject: Re: c/10319: shift right bug
Date: 06 Apr 2003 17:50:06 +0200
jens dot harms at informatik dot uni-oldenburg dot de writes:
> >Description:
> uint a = 16; uint w = 255;
> printf("%d",a >> w );
>
> a>>w is NOT NULL on x86 architecture (p3,athlon, duron)
Not a bug. Shift count >= width of type is undefined. It would be nice
to warn here, though, as we do for 16 >> 255.
--
Falk