This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Warning request.


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]