comp.lang.ada
 help / color / mirror / Atom feed
* GnAT Error with Remote_Types and Incomplete Type?
@ 2016-11-15 13:48 Eryndlia Mavourneen
  2016-11-15 19:10 ` Randy Brukardt
  2016-11-16 22:25 ` Eryndlia Mavourneen
  0 siblings, 2 replies; 6+ messages in thread
From: Eryndlia Mavourneen @ 2016-11-15 13:48 UTC (permalink / raw)


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;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GnAT Error with Remote_Types and Incomplete Type?
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Randy Brukardt @ 2016-11-15 19:10 UTC (permalink / raw)


What is the error message? It's unclear to me (from a quick scan of the RM) 
how an incomplete type in a remote types package should be handled, so I'm 
wondering what the compiler is complaining about.

                             Randy.

"Eryndlia Mavourneen" <eryndlia@gmail.com> wrote in message 
news:55194f1c-aba9-47b9-8173-ebd366aed405@googlegroups.com...
> 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; 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GnAT Error with Remote_Types and Incomplete Type?
  2016-11-15 19:10 ` Randy Brukardt
@ 2016-11-16  3:42   ` Eryndlia Mavourneen
  0 siblings, 0 replies; 6+ messages in thread
From: Eryndlia Mavourneen @ 2016-11-16  3:42 UTC (permalink / raw)


On Tuesday, November 15, 2016 at 1:10:56 PM UTC-6, Randy Brukardt wrote:
> What is the error message? It's unclear to me (from a quick scan of the RM) 
> how an incomplete type in a remote types package should be handled, so I'm 
> wondering what the compiler is complaining about.
> 
>                              Randy.
> 
> "Eryndlia Mavourneen" <eryndlia@gmail.com> wrote in message 
> news:55194f1c-aba9-47b9-8173-ebd366aed405@googlegroups.com...
> > 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;

Builder results must have visible Read and Write attribute definition clauses (RM E.2.2(8)) <b>4:9</b>       must have visible Read and Write attribute definition clauses (RM E.2.2(8)) 
Builder results
remote_types_incomplete_type.ads:4:9
must have visible Read and Write attribute definition clauses (RM E.2.2(8)) must have visible Read and Write attribute definition clauses (RM E.2.2(8))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GnAT Error with Remote_Types and Incomplete Type?
  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 22:25 ` Eryndlia Mavourneen
  2016-11-17  2:42   ` Randy Brukardt
  1 sibling, 1 reply; 6+ messages in thread
From: Eryndlia Mavourneen @ 2016-11-16 22:25 UTC (permalink / raw)


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.

-- em


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GnAT Error with Remote_Types and Incomplete Type?
  2016-11-16 22:25 ` Eryndlia Mavourneen
@ 2016-11-17  2:42   ` Randy Brukardt
  2016-11-17  3:59     ` Eryndlia Mavourneen
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Brukardt @ 2016-11-17  2:42 UTC (permalink / raw)


"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.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GnAT Error with Remote_Types and Incomplete Type?
  2016-11-17  2:42   ` Randy Brukardt
@ 2016-11-17  3:59     ` Eryndlia Mavourneen
  0 siblings, 0 replies; 6+ messages in thread
From: Eryndlia Mavourneen @ 2016-11-17  3:59 UTC (permalink / raw)


On Wednesday, November 16, 2016 at 8:42:36 PM UTC-6, Randy Brukardt wrote:
> 
> ...
> 
> 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.

I will do that, Randy.  Thanks for the sanity check.
Btw, the error curiously specified the line (4) of the completed type.

    Eryndlia Mavourneen, KK1T

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-17  3:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-11-17  3:59     ` Eryndlia Mavourneen

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