This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13421] IA32 bigmem pointer subtraction and –ftrapv option causes unjustified program abort


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]