c/10226: unsigned short promotion with bitwise inversion
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Wed Mar 26 22:26:00 GMT 2003
The following reply was made to PR c/10226; it has been noted by GNATS.
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: Glen Nakamura <glen@imodulo.com>
Cc: Michael Marks <Michael.Marks@internetmachines.com>, gcc-gnats@gcc.gnu.org
Subject: Re: c/10226: unsigned short promotion with bitwise inversion
Date: 26 Mar 2003 23:19:58 +0100
Glen Nakamura <glen@imodulo.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
More information about the Gcc-prs
mailing list