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: Todd Vierling <tv at pobox dot com>
- Date: Sat, 12 Sep 1998 17:31:06 -0400 (EDT)
- cc: egcs at cygnus dot com
On Sun, 6 Sep 1998, Zachary Alexander Weinberg wrote:
: 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?
The warnings are there because of too many code assumptions made in the past
about `char' being signed (among other things, but this is one of the
biggest--`char' is unsigned on platforms such as PowerPC and ARM).
Unfortunately, this is caused by the "-W" option (not, in fact, by -Wall,
which surprises me), and:
: Also, for reference, is there any switch that turns off -W?
No. After checking source, the relevant variable ("extra_warnings") is
turned on by the -W switch without a specific warning type, and there is no
relevant option to turn it off.
--
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)