aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/system-aix.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-03-08 18:11:31 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-25 09:44:18 +0200
commit31365eda4602181acced5b0479eb50ef1213e836 (patch)
tree09de03f53f5ab375fa377e7c13cafcdb1b21aa67 /gcc/ada/libgnat/system-aix.ads
parentec48b99c24a422bf97af91e82203d23b69094e7c (diff)
downloadgcc-31365eda4602181acced5b0479eb50ef1213e836.zip
gcc-31365eda4602181acced5b0479eb50ef1213e836.tar.gz
gcc-31365eda4602181acced5b0479eb50ef1213e836.tar.bz2
ada: Add size clause to System.Address
Standard'Address_Size is the value provided by the code generator for the size of pointers, and it is set as the default size of every thin pointer by the front-end. Now it is documented in the GNAT RM as having the value of System.Address'Size, which is indeed the case on (correctly configured) platforms where pointers contain exactly the number of bits that are needed to address the memory space. However, on platforms where pointers contain additional bits of metadata, it has a larger value and the documented relation does not hold, which also means that unchecked conversions between System.Address and pointers are seen as potentially problematic. In order to fix the discrepancy on these platforms, this change adds the obvious size clause to System.Address, which is confirming on all the other (correctly configured) platforms. gcc/ada/ * libgnat/system-aix.ads (Address): Likewise. * libgnat/system-darwin-arm.ads (Address): Likewise. * libgnat/system-darwin-ppc.ads (Address): Likewise. * libgnat/system-darwin-x86.ads (Address): Likewise. * libgnat/system-djgpp.ads (Address): Likewise. * libgnat/system-dragonfly-x86_64.ads (Address): Likewise. * libgnat/system-freebsd.ads (Address): Likewise. * libgnat/system-hpux-ia64.ads (Address): Likewise. * libgnat/system-hpux.ads (Address): Likewise. * libgnat/system-linux-alpha.ads (Address): Likewise. * libgnat/system-linux-arm.ads (Address): Likewise. * libgnat/system-linux-hppa.ads (Address): Likewise. * libgnat/system-linux-ia64.ads (Address): Likewise. * libgnat/system-linux-m68k.ads (Address): Likewise. * libgnat/system-linux-mips.ads (Address): Likewise. * libgnat/system-linux-ppc.ads (Address): Likewise. * libgnat/system-linux-riscv.ads (Address): Likewise. * libgnat/system-linux-s390.ads (Address): Likewise. * libgnat/system-linux-sh4.ads (Address): Likewise. * libgnat/system-linux-sparc.ads (Address): Likewise. * libgnat/system-linux-x86.ads (Address): Likewise. * libgnat/system-lynxos178-ppc.ads (Address): Likewise. * libgnat/system-lynxos178-x86.ads (Address): Likewise. * libgnat/system-mingw.ads (Address): Likewise. * libgnat/system-qnx-arm.ads (Address): Likewise. * libgnat/system-rtems.ads (Address): Likewise. * libgnat/system-solaris-sparc.ads (Address): Likewise. * libgnat/system-solaris-x86.ads (Address): Likewise. * libgnat/system-vxworks-ppc-kernel.ads (Address): Likewise. * libgnat/system-vxworks-ppc-rtp-smp.ads (Address): Likewise. * libgnat/system-vxworks-ppc-rtp.ads (Address): Likewise. * libgnat/system-vxworks7-aarch64-rtp-smp.ads (Address): Likewise. * libgnat/system-vxworks7-aarch64.ads (Address): Likewise. * libgnat/system-vxworks7-arm-rtp-smp.ads (Address): Likewise. * libgnat/system-vxworks7-arm.ads (Address): Likewise. * libgnat/system-vxworks7-ppc-kernel.ads (Address): Likewise. * libgnat/system-vxworks7-ppc-rtp-smp.ads (Address): Likewise. * libgnat/system-vxworks7-ppc64-kernel.ads (Address): Likewise. * libgnat/system-vxworks7-ppc64-rtp-smp.ads (Address): Likewise. * libgnat/system-vxworks7-x86-kernel.ads (Address): Likewise. * libgnat/system-vxworks7-x86-rtp-smp.ads (Address): Likewise. * libgnat/system-vxworks7-x86_64-kernel.ads (Address): Likewise. * libgnat/system-vxworks7-x86_64-rtp-smp.ads (Address): Likewise.
Diffstat (limited to 'gcc/ada/libgnat/system-aix.ads')
-rw-r--r--gcc/ada/libgnat/system-aix.ads2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/system-aix.ads b/gcc/ada/libgnat/system-aix.ads
index 18ed063..1485df4 100644
--- a/gcc/ada/libgnat/system-aix.ads
+++ b/gcc/ada/libgnat/system-aix.ads
@@ -116,6 +116,8 @@ package System is
private
type Address is mod Memory_Size;
+ for Address'Size use Standard'Address_Size;
+
Null_Address : constant Address := 0;
--------------------------------------