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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: What exactly is the licensing situation with GNAT? Date: Mon, 17 Nov 2014 18:37:28 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <22a3816a-4e89-48f0-a126-dce581781beb@googlegroups.com> <084b1934-9641-425e-85ec-293e0334413e@googlegroups.com> <86bf69c8-eb08-4696-b6c9-3784f5c42213@googlegroups.com> <87389olqie.fsf@ixod.org> <19fa65d4-72c9-44ab-b44b-4ea0929c18f2@googlegroups.com> NNTP-Posting-Host: 24-196-82-226.static.mdsn.wi.charter.com X-Trace: loke.gir.dk 1416271050 30772 24.196.82.226 (18 Nov 2014 00:37:30 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 18 Nov 2014 00:37:30 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:23492 Date: 2014-11-17T18:37:28-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:dilqwcbqc502$.l6p0xx7myoiu.dlg@40tude.net... > On Fri, 14 Nov 2014 16:24:14 -0600, Randy Brukardt wrote: > >> OTOH, I don't see why this would be any different than access types >> vis-a-vis interfacing with C and the like. The type would have a >> representation (likely one similar to access-to-subprogram), and that's >> the >> problem for 'Unrestricted_Access - it needs a different representation to >> support 'Unrestricted_Access from 'Access. And the representation needed >> for >> 'Unrestricted_Access is incompatible with C (other than on GCC, which is >> unusual). If you simply allowed any subprogram to match a subprogram >> type, >> you couldn't allow interface to C. Or you'd have to have an accessibility >> check on the use only for interface to C. Or some other messy rule - >> would >> not gain anything. > > Except that whatever checks needed they will not include pointer checks. > If > a nested subprogram cannot be passed to C, then it cannot. But the reason > shall not be accessibility pointer check. The only reason allowed is > "cannot implement pragma Convention". Huh? The problem is that (some) nested subprograms cannot be passed to C. And allowing them to be passed in Ada is unconsonably expensive (at the very least, you'll need a mechanism to say that you don't want to pay for that overhead). What does pragma convention have to do with it? Randy.