From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Preelaboration Date: Mon, 16 May 2016 22:03:47 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="df4c32f3bd97eb14b94825e0d909f9c9"; logging-data="8145"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GtXlqAOEoEOJhLCRHbiOS+LVoPB+D3MM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:2+79O1l07/f/nFq3tPtGTfCGucQ= sha1:LfJdGVIJYlOGV1v3Yirvkt2Dvq8= Xref: news.eternal-september.org comp.lang.ada:30424 Date: 2016-05-16T22:03:47+01:00 List-Id: "Randy Brukardt" writes: > In addition, formal types aren't allowed to have language-defined aspects, > as that would add implicit contracts to the specification (and notably, > would need rules for those contracts). pragma P_I isn't allowed in a formal > part, either. But 10.2.1(10.1), (11.2) explicitly mention P_I in a formal part? > But this area is complicated (I might be getting it all wrong) and it > probably doesn't do what you want anyway (Pure/Preelaborable categorizations > in general were a failure, as they can't be applied to the majority of > packages). I don't really have any advice, other than if you really care, > look up the old AIs on the topic. Thanks for the advice. Things are clearer now, I think; anyway, it turns out it was indeed the generic that caused the package it was instantiated in to require elaboration. I expanded the generic (of which this was the only instance, huh) by hand in the caller, no more elaboration. GNAT has a program-unit restriction No_Elaboration_Code[1] which is a lot closer to what I want. I can't remember now how I got into the state where the compiler told me I couldn't use it ... [1] https://gcc.gnu.org/onlinedocs/gnat_rm/No_005fElaboration_005fCode.html