This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -Wsign-compare to strict?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: -Wsign-compare to strict?
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Date: Fri, 22 Sep 2000 23:30:10 +0200 (CEST)
On Wed, 10 Mar 1999, Gerald Pfeifer wrote:
> The following snippet
>
> bool f();
>
> void g(unsigned u) {
> if( u > 1 );
> if( u > 2 );
> if( u > (f() ? 1 : 2) ) ;
> }
>
> generates a warning which I really don't like[TM]
>
> x.cc: In function `void g(unsigned int)':
> x.cc:6: warning: comparison between signed and unsigned
>
> when compiled with `egcs-current-cvs -Wsign-compare`
>
> Note that this only occurs with the ? : expression, not in the other
> two cases.
To whoever it may concern ;-)
Thanks for fixing this (in current CVS, 2.95.x exihibits the bug)!
Report closed.
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/