Commit 2503cb81 by Olivier Hainque Committed by Arnaud Charlet

(gnat_to_gnu_param): Use void_ptr GCC type for System.Address argument

of GCC builtin imports.

From-SVN: r161261
parent d92eccc3
......@@ -48,6 +48,8 @@
(intrin_return_compatible_p): Never warn on "function imported as
procedure". Defer the void/void case to the common type compatibility
check.
(gnat_to_gnu_param): Use void_ptr GCC type for System.Address argument
of GCC builtin imports.
2010-06-23 Olivier Hainque <hainque@adacore.com>
......
......@@ -5264,6 +5264,12 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech,
gnu_param_type
= TREE_TYPE (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (gnu_param_type))));
/* For GCC builtins, pass Address integer types as (void *) */
if (Convention (gnat_subprog) == Convention_Intrinsic
&& Present (Interface_Name (gnat_subprog))
&& Is_Descendent_Of_Address (Etype (gnat_param)))
gnu_param_type = ptr_void_type_node;
/* VMS descriptors are themselves passed by reference. */
if (mech == By_Short_Descriptor ||
(mech == By_Descriptor && TARGET_ABI_OPEN_VMS && !TARGET_MALLOC64))
......
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