Commit 38d7a13a by Eric Botcazou Committed by Arnaud Charlet

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
parent a493557f
...@@ -62,6 +62,13 @@ pragma Elaborate_Body; ...@@ -62,6 +62,13 @@ pragma Elaborate_Body;
type Object_Pointer is access all Object; type Object_Pointer is access all Object;
for Object_Pointer'Size use Standard'Address_Size; 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_Pointer (Value : Address) return Object_Pointer;
function To_Address (Value : Object_Pointer) return Address; function To_Address (Value : Object_Pointer) return Address;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment