comp.lang.ada
 help / color / mirror / Atom feed
From: "Alejandro R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Generic private type declaration
Date: Mon, 28 Nov 2016 16:05:27 +0100
Date: 2016-11-28T16:05:27+01:00	[thread overview]
Message-ID: <o1hh1b$13v$1@dont-email.me> (raw)
In-Reply-To: <o1cn4b$c5f$1@franka.jacob-sparre.dk>

On 26/11/16 20:18, Tero Koskinen wrote:
> 26.11.2016, 10.45, Jacob Sparre Andersen wrote:
>> Alejandro R. Mosteo wrote:
>>
>>> I get in both gnat 4.9.3 and gpl2016 the following error:
>>>
>>> b001_tagged.adb:15:04: instantiation error at line 7
>>> b001_tagged.adb:15:04: type derived from tagged type must have extension
>>> gnatmake: "b001_tagged.adb" compilation error
> ...
>> I suspect that this is an error due to how GNAT expands generics.  It
>> might be useful to try to see how Janus/Ada and ICC/Ada treats it.  If I
>> remember correctly, Janus/Ada implements generics differently from GNAT.
>
> Janus/Ada 3.1.2c result here, just a warning on line 13:
> Input File Is C:\Work\mosteo-generic\B001_TAGGED.ADB
> Pass II
> Expected J2inst duplication to be the same
>
>
> In File C:\Work\mosteo-generic\B001_TAGGED.ADB(13)
> --------------
>    12:
>    13:     type Void is tagged null record;
> ----------------^
> *WARNING* Construct allowed only in a package specification (6.4.9)
> Expected J2inst duplication to be the same
> Bad or locked TREEFLAG.IN file -- see J3Tree_Debug
> Pass III - JCode
> Pass IV - 80386 Family
> Creating C:\Work\mosteo-generic\B001_TAG.SRL
> Thank You For Using JANUS/Ada
> (...)

Thanks to everyone that answered/took the time to test.

So, to summarize: Janus/Ada accepts it, Gnat does not, and some other 
compiler used by G.B. also rejects it.

Cheers,
Alex.

>
>>
>> Greetings,
>>
>> Jacob
>>
>
> Yours,
>  Tero
>

  reply	other threads:[~2016-11-28 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 17:36 Generic private type declaration Alejandro R. Mosteo
2016-11-25 19:17 ` Dmitry A. Kazakov
2016-11-28 14:54   ` Alejandro R. Mosteo
2016-11-25 19:18 ` AdaMagica
2016-11-28 14:57   ` Alejandro R. Mosteo
2016-11-25 19:38 ` G.B.
2016-11-26  8:45 ` Jacob Sparre Andersen
2016-11-26 19:18   ` Tero Koskinen
2016-11-28 15:05     ` Alejandro R. Mosteo [this message]
2016-11-28 21:32       ` Randy Brukardt
2016-11-29 11:12         ` Alejandro R. Mosteo
2016-11-29 11:42         ` Dmitry A. Kazakov
2016-11-29 23:48           ` Randy Brukardt
2016-11-28 23:25 ` Robert Eachus
replies disabled

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