Commit b15062a8 by Tristan Gingold Committed by Arnaud Charlet

decl.c (intrin_return_compatible_p): Map Address to void *.

2012-07-16  Tristan Gingold  <gingold@adacore.com>

	* decl.c (intrin_return_compatible_p): Map Address to void *.

From-SVN: r189536
parent 9d08a38d
2012-07-16 Tristan Gingold <gingold@adacore.com>
* gcc-interface/decl.c (intrin_return_compatible_p): Map Address to
void *.
2012-07-16 Thomas Quinot <quinot@adacore.com> 2012-07-16 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb (Ensure_Statement_Present): New subprogram. * exp_ch9.adb (Ensure_Statement_Present): New subprogram.
......
...@@ -8046,6 +8046,10 @@ intrin_return_compatible_p (intrin_binding_t * inb) ...@@ -8046,6 +8046,10 @@ intrin_return_compatible_p (intrin_binding_t * inb)
&& !VOID_TYPE_P (btin_return_type)) && !VOID_TYPE_P (btin_return_type))
return true; return true;
/* If return type is Address (integer type), map it to void *. */
if (Is_Descendent_Of_Address (Etype (inb->gnat_entity)))
ada_return_type = ptr_void_type_node;
/* Check return types compatibility otherwise. Note that this /* Check return types compatibility otherwise. Note that this
handles void/void as well. */ handles void/void as well. */
if (intrin_types_incompatible_p (btin_return_type, ada_return_type)) if (intrin_types_incompatible_p (btin_return_type, ada_return_type))
......
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