This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/10226: unsigned short promotion with bitwise inversion
- 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: 26 Mar 2003 22:26:00 -0000
- Subject: Re: c/10226: unsigned short promotion with bitwise inversion
- Reply-to: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
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