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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:ed0b:: with SMTP id r11mr2754421ith.30.1559872290063; Thu, 06 Jun 2019 18:51:30 -0700 (PDT) X-Received: by 2002:a9d:2f0:: with SMTP id 103mr8087089otl.182.1559872289915; Thu, 06 Jun 2019 18:51:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!s188no136916itb.0!news-out.google.com!l126ni201itl.0!nntp.google.com!g15no130948itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 6 Jun 2019 18:51:29 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <15a1e593-42f5-4f80-a84c-c5b6d3f1ef7b@googlegroups.com> Subject: Convention Question related to access types From: Jere Injection-Date: Fri, 07 Jun 2019 01:51:30 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56517 Date: 2019-06-06T18:51:29-07:00 List-Id: The RM in section B.1 talks about Ada Standard requirements for convention compatibility. In it however it doesn't mention anything about private types, full views, etc. Say you are wanting to bind to an opaque type in C: package Bindings is type Opaque_Type(<>) is limited private; type Binding is access Opaque_Type with Convention => C; procedure Some_Procedure(Value : Binding) with Import, Convention => C; private type Opaque_Base is limited null record with Convention => C; type Opaque_Type is new Opaque_Base; end Bindings; GNAT happily accepts that, but I am unsure if that is because of the "The implementation permits T as an L-compatible type." part or because Opaque_Base is a proper convention compatible type and Opaque_Type derives from it and is thus convention compatible as well, even though it is a private type. I couldn't find anything dictating whether the convention compatibility rules applied the to full view or the public view.