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,f57aba5273502edf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.135.106 with SMTP id pr10mr4431879pbb.3.1335404838801; Wed, 25 Apr 2012 18:47:18 -0700 (PDT) MIME-Version: 1.0 Path: r9ni98937pbh.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: bindings with Ada 2012 aspects Date: Wed, 25 Apr 2012 20:47:14 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1335404837 30433 69.95.181.76 (26 Apr 2012 01:47:17 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 26 Apr 2012 01:47:17 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-04-25T20:47:14-05:00 List-Id: "Jerrid Kimball" wrote in message news:jn7egd$scs$1@munin.nbi.dk... ... > As I see it, a pragma Export should be directly replaceable by interfacing > aspects' aspect marks and definitions: > > procedure Wait renames PO.Wait; > pragma Export (C, Wait, "wait"); > > becomes: > > procedure Wait renames PO.Wait > with Export => True, Convention => C, Link_Name => "wait"; > > Am I looking at what should be submitted to ACT as a bug? I believe this replacement is correct, except for one tiny detail: No language-defined aspects are allowed on renames, and the above is a renames. The reason is that almost all language-defined aspects are the same for all views of an entity, and a rename just introduces another view. Moreover, this renames "trick" exists for pragmas simply to get around the limitations of pragmas for overloaded entities, something that is totally unnecessary for aspects. I think in this particular case, you are trying to create a wrapper with this renames (as opposed to "just" another view of the original subprogram). I think that allowing the original pragma is dubious (although an implementation is allowed to support Import and Export on anything they like -- but it certainly is *not* portable). So, I think you need to replace this subprogram renames by a real subprogram (one that calls PO.Wait in it's body), and I suspect if you do that you'll have no problems with the aspects. Randy Brukardt, Editor, ISO/IEC 8652:tdb. :-)