This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19457] [4.0 Regression] Warning depends on cached constant
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2005 18:09:55 -0000
- Subject: [Bug c++/19457] [4.0 Regression] Warning depends on cached constant
- References: <20050115123233.19457.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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