comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Dueling Compilers
Date: Wed, 2 Dec 2020 07:41:49 -0800 (PST)	[thread overview]
Message-ID: <14c834fb-8755-480e-ac00-42ab637f89c3n@googlegroups.com> (raw)
In-Reply-To: <rploh9$3kd$1@dont-email.me>

On Wednesday, November 25, 2020 at 7:08:43 AM UTC-7, Jeffrey R. Carter wrote:
> Consider the package 
> 
> with Ada.Containers.Bounded_Doubly_Linked_Lists; 
> 
> generic 
> type E is private; 
> package Preelaborable is 
> package EL is new Ada.Containers.Bounded_Doubly_Linked_Lists 
> (Element_Type => E); 
> end Preelaborable; 
> 
> Two Ada-12 compilers give different results on this. Compiler G accepts it 
> without problem. Compiler O rejects it with the error message 
> 
> preelaborable.ads: Error: line 6 col82 LRM:10.2.1(11.8/2), If a pragma 
> Preelaborable_Initialization has been applied to the generic formal, the 
> corresponding actual type must have preelaborable initialization 
> 
> AFAICT from the ARM, the generic formal Element_Type of 
> Ada.Containers.Bounded_Doubly_Linked_Lists does not have pragma 
> Preelaborable_Initialization applied to it. However, the type List, which 
> probably has [sub]components of Element_Type, does. 
> 
> Which compiler is correct? What is the intent of the ARM? 

Acceptance is the correct evaluation.
"package NAME is" is quite clearly the proper construction, there is no aspect here, and so aspect "preelaborable" is *NOT* indicated, EVEN IF the given NAME is "preelaborable".

  parent reply	other threads:[~2020-12-02 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 14:08 Dueling Compilers Jeffrey R. Carter
2020-11-26  2:19 ` Randy Brukardt
2020-11-27  7:32   ` Jeffrey R. Carter
2020-11-28  2:35     ` Randy Brukardt
2020-12-17 20:22       ` Jeffrey R. Carter
2020-12-19  2:00         ` Randy Brukardt
2020-12-02 15:41 ` Shark8 [this message]
2020-12-02 16:08   ` AdaMagica
replies disabled

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