
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Re: gcc:0x81 out of range
Nguyen Vu Hung wrote:
> Hello all,
>
> Please refer to the code in the attachment.
>
> I have compiled this function with Redhat Enterprise Linux 3, gcc
> 3.2.3.20 and it says:
>
> trim.c:28: warning: comparison is always false due to limited range of data
> type
> trim.c:38: warning: comparison is always false due to limited range of data
> type
>
> I *thought* this code will get compiled and run in Windows with VC6 at
> least, but with gcc 3.2.3, I got the warning ( as you can see ) : 0x81
> is out of range.
>
> If run properly, this code will trim UEC space but under my
> environment, it does not.
>
> Any idea?
char may be an unsigned or a signed type, depending on compiler and
platform.
gcc supports "-funsigned-char" and "-fsigned-char", useful if you
want to compile code that expects the wrong signedness.
--
Tobias PGP: http://9ac7e0bc.uguu.de
このメールは十割再利用されたビットで作られています。
Home |
Main Index |
Thread Index