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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7b93c6665052aea2 X-Google-Attributes: gid103376,public From: Rod Chapman Subject: Re: How to pass access parameters to/from C safely/portably? Date: 1998/06/05 Message-ID: <3577D39C.3CECE1C0@praxis-cs.co.uk>#1/1 X-Deja-AN: 359795474 Content-Transfer-Encoding: 7bit References: <3572CB7D.FD6D8084@praxis-cs.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Praxis plc, U.K. Newsgroups: comp.lang.ada Date: 1998-06-05T00:00:00+00:00 List-Id: Rod Chapman wrote: > I wonder if anyone out there could advise me on a point of > portability and style with respect to passing > access parameters from C to Ada. > I can close this thread before anyone has even responded! The answers are: 1) Read the implementation advice in LRM B.3 carefully, and check that your compiler follows it. 2) Check that your compiler does or doesn't expect accessibility information to be passed to formal anonymous access parameters that appear in subprograms which have pragma Import or Export. For example, with ObjectAda, I find that applying pragma Export forces an anonymous access parameter to not have accessibility checks applied, and the actual parameter can be a simple C pointer-to-something - this seems to be the obvious implementation, but it's worth checking...anyone confirm if GNAT does the same? - Rod