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

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Dec 17 18:22:00 GMT 2003


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-17 17:53 -------
Pointers signness are determined by the ABI.
Here are the list of targets that are unsigned:
./alpha/vms.h:#define POINTERS_EXTEND_UNSIGNED 0
./ia64/hpux.h:#define POINTERS_EXTEND_UNSIGNED -1
./mips/mips.h:#define POINTERS_EXTEND_UNSIGNED 0
./s390/s390.h:#define POINTERS_EXTEND_UNSIGNED -1
./sparc/sparc.h:#define POINTERS_EXTEND_UNSIGNED 1
There are not many.
-ftrapv is done for all signed "addition, subtraction, multiplication operations".
So this is a request for documentation about -ftrapv and pointer arightatic.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |documentation
   Last reconfirmed|0000-00-00 00:00:00         |2003-12-17 17:53:14
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13421



More information about the Gcc-bugs mailing list