From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Dueling Compilers
Date: Wed, 25 Nov 2020 15:08:40 +0100 [thread overview]
Message-ID: <rploh9$3kd$1@dont-email.me> (raw)
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?
--
Jeff Carter
"Apart from the sanitation, the medicine, education, wine,
public order, irrigation, roads, the fresh water system,
and public health, what have the Romans ever done for us?"
Monty Python's Life of Brian
80
next reply other threads:[~2020-11-25 14:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 14:08 Jeffrey R. Carter [this message]
2020-11-26 2:19 ` Dueling Compilers 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
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