This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Ease interface with builtins that returns void *


The natural way to import a builtin that returns void * is to use
System.Address in Ada, which is in fact an integral type.

Addressed by this patch, which makes it possible to e.g. compile:

with System;
procedure Btins1 is

   function Frame_Address (Level : Integer) return System.Address;
   pragma Import (Intrinsic, Frame_Address, "__builtin_frame_address");

   Ptr : System.Address;
   pragma Volatile (Ptr);
begin
   Ptr := Frame_Address (0);
end;

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-07-16  Tristan Gingold  <gingold@adacore.com>
        
	* gcc-interface/decl.c (intrin_return_compatible_p): Map Address to     
	void *.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]