mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-12 13:11:48 +08:00
(gnat_to_gnu_param): Use void_ptr GCC type for System.Address argument
of GCC builtin imports. From-SVN: r161261
This commit is contained in:
parent
d92eccc359
commit
2503cb81ee
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user