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: 17 Dec 2003 17:03:12 -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-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