This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Warning request.
- To: GCC Hackers <gcc at gcc dot gnu dot org>
- Subject: Warning request.
- From: Kevin Atkinson <kevinatk at home dot com>
- Date: Sat, 26 Feb 2000 20:50:25 -0500
I just ran into a problem with my aspell package
(http://aspell.sourceforge.net) on linux on the powerpc which relates
the the following code:
char c;
while ((c = FILE.get()) != EOF) ...
Which on the powerpc will give the warning:
aspell.cc:611: warning: comparison is always true due to limited range
of data type
However on platforms with a signed character no warning is given -- even
with -Wall.
Is there some way for egcs to warn about comparison of a "char" to a
negative integer constant on platforms with a signed char?
It would be really help full as the submitted of the bug report claimed
code like this is
responsible for 50 % of porting problems to the PowerPC.
Thanks.
--
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/