c/10319: shift right bug
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Sun Apr 6 15:56:00 GMT 2003
The following reply was made to PR c/10319; it has been noted by GNATS.
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: jens.harms@informatik.uni-oldenburg.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/10319: shift right bug
Date: 06 Apr 2003 17:50:06 +0200
jens.harms@informatik.uni-oldenburg.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
More information about the Gcc-prs
mailing list