Mail Archives: djgpp/1997/10/26/01:18:37
Hi, all!
I have encountered a problem with porting a program
from BC++ 3.1 to gnu c++ (from DJGPP 2.01 package).
The problem is best seen in this example of code:
--------------------------------------------------
unsigned char a;
a = 253;
if (a=='\xFD') {
...
};
--------------------------------------------------
Compiler gives warning, that
"comparison is always 0 due to limited range of data type"
(no matter with or without '-funsigned-char' flag)
There were nothing of the sort in BC.
When I use signed char a, the warning
disappears, but other things dont work properly
(e.g., xlat[b] ).
Is there any regular and efficient way to have unsigned chars
and comparisons with symbols above 127?
Are there any documents about porting
programs from BC/TC to DJGPP/gnu C++
beyond djgppfaq?
Thank you for answer.
Sincerely yours,
Roman
--
-- * --
-- Roman A. Suzi * Petrozavodsk Karelia Russia --
-- http://www.angelfire.com/ks/sudensivu --
- Raw text -