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-17 17:03 -------
That is a (working) workaround, not a solution IMHO.
The workaround you propose means that basically any subtraction of any pair of 
pointer need to be casted to unsigned because in theory any data structure may 
end up near the middle of the address space. Otherwise anyone risks random 
aborts.

Even more, if I would want to write a portable program, I cannot do it using 
your proposed workaround because in general there is no such thing as an 
integer data type that can hold a pointer.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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]