g++ 2.96 -W issues bogus warning for conditional expression with enum and unsigned

Nathan Sidwell nathan@codesourcery.com
Thu Jul 6 01:43:00 GMT 2000


"Martin v. Loewis" wrote:

> so maybe Nathan can comment about the exact rationale for this

What I wrote about that is available at
http://gcc.gnu.org/ml/gcc-patches/1999-08n/msg00843.html
(summary: they ware existing warnings which had been rendered impotent
by changes elsewhere).

I happen to think them sensible (maybe the wording could be
changed to make it clear what is happening).

However, looking at Martin Sebor's example, the enumeration should be
unsigned, so the warning should not be triggered -- I'll take a look.

> warning, and point to the exact place in the documentation where this
> warning is documented.
Documentation? You want documentation? There's no section in gcc.texi
describing the rationale for particular warnings, perhaps there should
be.

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


More information about the Gcc-bugs mailing list