[Bug c++/19457] [4.0 Regression] Warning depends on cached constant
schlie at comcast dot net
gcc-bugzilla@gcc.gnu.org
Sat Jan 15 18:10:00 GMT 2005
------- Additional Comments From schlie at comcast dot net 2005-01-15 18:09 -------
(In reply to comment #4)
(again sorry), nor should ~0 be considred equivelent to -1, any more than any explicit
non-signed constant like 0xFFFF for example be (as previously questioned), as such
values only have equivelent representations if the constant's required representation
precision happens to be the same as the targets specifed int type-sizes; therefore
would not be reasonably target portable if treated otherwise.
(assuming for the sake of argument if sizeof(int) = 2, sizeof(long) = 4):
unsigned long = (assumed signed int compatibe) -1, long == 0xFFFFFFFF
unsigend long = (assumed unsigned int compatible)~0, long == 0x000FFFF
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19457
More information about the Gcc-bugs
mailing list