From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:9b:: with SMTP id c27mr3139731qtg.197.1606923710133; Wed, 02 Dec 2020 07:41:50 -0800 (PST) X-Received: by 2002:a05:622a:14c:: with SMTP id v12mr3103775qtw.11.1606923709964; Wed, 02 Dec 2020 07:41:49 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 2 Dec 2020 07:41:49 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <14c834fb-8755-480e-ac00-42ab637f89c3n@googlegroups.com> Subject: Re: Dueling Compilers From: Shark8 Injection-Date: Wed, 02 Dec 2020 15:41:50 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:60665 List-Id: 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".