From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c6acbb9f2027b8c9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: volatile vs aliased Date: Wed, 05 Oct 2005 21:55:30 +0100 Organization: Pushface Message-ID: References: <1128525722.605730.281980@g43g2000cwa.googlegroups.com> <87mzlnomca.fsf@ludovic-brenta.org> <1128537566.929419.121660@g14g2000cwa.googlegroups.com> <874q7voigp.fsf@ludovic-brenta.org> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1128545731 1348 62.49.19.209 (5 Oct 2005 20:55:31 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 5 Oct 2005 20:55:31 +0000 (UTC) Cancel-Lock: sha1:K+z3ZSDFGPbo4DkmCm7WY7Pjj+M= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:5427 Date: 2005-10-05T21:55:30+01:00 List-Id: Ludovic Brenta writes: > procedure Call_Procedure (At_Address : in System.Address) is > procedure Proc; > for Proc'Address use At_Address; > begin > Proc; > end Call_Procedure; With GCC 4.0.0, you need to say pragma Import (C, Proc); as well. with Ada.Text_IO; use Ada.Text_IO;With System; procedure Acc is procedure Call (At_Address : System.Address) is procedure Proc; pragma Import (C, Proc); for Proc'Address use At_Address; begin Proc; end Call; procedure Callee is begin Put_Line ("hello world."); end Callee; begin Call (Callee'Address); end Acc;