diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2005-06-16 10:44:56 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-06-16 10:44:56 +0200 |
commit | 38d7a13afcafa6d5b53ec2caa8d2d9eda1989152 (patch) | |
tree | 90682c639eefb087804d66f5b996009318e43319 /gcc | |
parent | a493557f3ac51eb4c8967a5816f980ca547c2365 (diff) | |
download | gcc-38d7a13afcafa6d5b53ec2caa8d2d9eda1989152.zip gcc-38d7a13afcafa6d5b53ec2caa8d2d9eda1989152.tar.gz gcc-38d7a13afcafa6d5b53ec2caa8d2d9eda1989152.tar.bz2 |
s-atacco.ads: Put a pragma No_Strict_Aliasing on Object_Pointer.
2005-06-14 Eric Botcazou <ebotcazou@adacore.com>
* s-atacco.ads: Put a pragma No_Strict_Aliasing on Object_Pointer.
From-SVN: r101055
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/s-atacco.ads | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/s-atacco.ads b/gcc/ada/s-atacco.ads index 6f8bd94..7ccb339 100644 --- a/gcc/ada/s-atacco.ads +++ b/gcc/ada/s-atacco.ads @@ -62,6 +62,13 @@ pragma Elaborate_Body; type Object_Pointer is access all Object; for Object_Pointer'Size use Standard'Address_Size; + pragma No_Strict_Aliasing (Object_Pointer); + -- Strictly speaking, this routine should not be used to generate pointers + -- to other than proper values of the proper type, but in practice, this + -- is done all the time. This pragma stops the compiler from doing some + -- optimizations that may cause unexpected results based on the assumption + -- of no strict aliasing. + function To_Pointer (Value : Address) return Object_Pointer; function To_Address (Value : Object_Pointer) return Address; |