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!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GnAT Error with Remote_Types and Incomplete Type? Date: Wed, 16 Nov 2016 20:42:34 -0600 Organization: JSA Research & Innovation Message-ID: References: <55194f1c-aba9-47b9-8173-ebd366aed405@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1479350505 2054 24.196.82.226 (17 Nov 2016 02:41:45 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 17 Nov 2016 02:41:45 +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:32357 Date: 2016-11-16T20:42:34-06:00 List-Id: "Eryndlia Mavourneen" wrote in message news:a49d0b39-e52a-4ada-9328-266adf2d358e@googlegroups.com... > On Tuesday, November 15, 2016 at 7:48:28 AM UTC-6, Eryndlia Mavourneen > wrote: >> Is this a compiler error? >> >> This compiles: >> >> package Remote_Types_Incomplete_Type with Remote_Types is >> >> type My_Interface_Type is task interface; >> >> end Remote_Types_Incomplete_Type; >> >> This does not compile: >> >> package Remote_Types_Incomplete_Type with Remote_Types is >> >> type My_Interface_Type; >> type My_Interface_Type is task interface; >> >> end Remote_Types_Incomplete_Type; > > It may be that this error is normally never occurs. It was left over from > a prior version > of the unit in which it was actually needed. The error helped me, because > it led me to > code from that previous version, that I had neglected to remove. The incomplete type is certainly is strange, because it does not seem necessary (it should be fine to declare the task interface at the point of the incomplete declaration). Still, it seems that it should work. Specifically, E.2.2(8) [which you say the compile is citing] says that the "full view of each type declared in the visible part that has any available stream attributes shall support external streaming". Since an incomplete type declares an incomplete view which is obviously not a full view, it shouldn't be subject to this rule, and thus the error is bogus. I'd report it to AdaCore, with the low priority it deserves (since this specific code is rather nonsense). Randy.