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

Re: c/10319: shift right bug


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


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