This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13421] IA32 bigmem pointer subtraction and –ftrapv option causes unjustified program abort
- From: "vik dot heyndrickx at pandora dot be" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2003 10:23:26 -0000
- Subject: [Bug c/13421] IA32 bigmem pointer subtraction and –ftrapv option causes unjustified program abort
- References: <20031217152930.13421.vik.heyndrickx@pandora.be>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From vik dot heyndrickx at pandora dot be 2003-12-19 10:23 -------
(In reply to comment #11)
> Later on, I realizes that when p is a pointer, and q is set to
> e.g. p + 2, that q < p for some values of p
> (e.g. (void*)0x7FFFFFFFu) on IA32. Signedness and an addressible
> flat memory space larger than 2^31 are not compatible.
To my big surprise I found out today that pointer on IA32 are treated as
unsigneds. At least when comparing pointers. The IA32 asm code for comparing
unsigneds and pointers is the same. It differs for signeds.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13421