This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bizarre warnings
- To: Zachary Alexander Weinberg <zaw2 at columbia dot edu>
- Subject: Re: bizarre warnings
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 07 Sep 1998 23:18:42 -0600
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199809070157.VAA28076@aloha.cc.columbia.edu>you write:
> While trying to make some code compile cleanly with -W -Wall I got some
> warnings I've never seen before.
>
> t-coverage/string-test.inc:314: warning: unsigned value < 0 is always 0
> t-coverage/string-test.inc:346: warning: unsigned value >= 0 is always 1
>
> These are valid from the compiler's point of view, but the code is correct
> (it's testing corner cases in a complicated macro). Is there a
> -Wno-something switch that kills these and *only* these warnings?
Don't know off the top of my head. You might look at the gcc manual
since it should list all the warning options.
> t-coverage/libm-test.inc:2382: warning: overflow on truncation to integer
> t-coverage/libm-test.inc:6212: warning: ediv invalid operation error
The ediv warning is due to 0/0 or inf/inf.
The overflow on truncation means there's a floating point number that
can not be represented with an int because it is too big.
jeff