comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GnAT Error with Remote_Types and Incomplete Type?
Date: Wed, 16 Nov 2016 20:42:34 -0600
Date: 2016-11-16T20:42:34-06:00	[thread overview]
Message-ID: <o0j5d8$206$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: a49d0b39-e52a-4ada-9328-266adf2d358e@googlegroups.com

"Eryndlia Mavourneen" <eryndlia@gmail.com> 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.






  reply	other threads:[~2016-11-17  2:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 13:48 GnAT Error with Remote_Types and Incomplete Type? Eryndlia Mavourneen
2016-11-15 19:10 ` Randy Brukardt
2016-11-16  3:42   ` Eryndlia Mavourneen
2016-11-16 22:25 ` Eryndlia Mavourneen
2016-11-17  2:42   ` Randy Brukardt [this message]
2016-11-17  3:59     ` Eryndlia Mavourneen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox