summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:44:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:44:56 +0000
commit7b785fabdf01ec9fe778b0790b99652e14b5f694 (patch)
tree90682c639eefb087804d66f5b996009318e43319 /gcc
parent2211e64d4eb31d59fb53c6ff5378da53b1fd0a9b (diff)
downloadgcc-7b785fabdf01ec9fe778b0790b99652e14b5f694.tar.gz
2005-06-14 Eric Botcazou <ebotcazou@adacore.com>
* s-atacco.ads: Put a pragma No_Strict_Aliasing on Object_Pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101055 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/s-atacco.ads7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/s-atacco.ads b/gcc/ada/s-atacco.ads
index 6f8bd94b81a..7ccb3395a30 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;