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/10226: unsigned short promotion with bitwise inversion


The following reply was made to PR c/10226; it has been noted by GNATS.

From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
To: Glen Nakamura <glen at imodulo dot com>
Cc: Michael Marks <Michael dot Marks at internetmachines dot com>, gcc-gnats at gcc dot gnu dot org
Subject: Re: c/10226: unsigned short promotion with bitwise inversion
Date: 26 Mar 2003 23:19:58 +0100

 Glen Nakamura <glen at imodulo dot com> writes:
 
 > On Wed, Mar 26, 2003 at 10:39:43PM +0100, Falk Hueffner wrote:
 > > Indeed. Currently, it says:
 > > warning: comparison of promoted ~unsigned with unsigned
 > > Suggestion:
 > > warning: comparison of ~(promoted unsigned) with unsigned
 > 
 > How about one of these:
 > warning: comparison of promoted ~unsigned with unsigned is always false
 > warning: comparison of ~(promoted unsigned) with unsigned is always false
 
 Yes, that makes it even clearer. I'd prefer the second variant.  (BTW,
 funny, the optimizer doesn't seem to realize it's always false...)
 
 -- 
 	Falk


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