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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Elaboration Question Date: Mon, 5 Jan 2015 20:33:13 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <_3spw.995330$Fo3.305798@fx09.iad> <176076d0-ca97-46b5-8b6f-81e9289643c4@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1420511594 1616 24.196.82.226 (6 Jan 2015 02:33:14 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 6 Jan 2015 02:33:14 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:24393 Date: 2015-01-05T20:33:13-06:00 List-Id: "Niklas Holsti" wrote in message news:cgoihuF7sr6U1@mid.individual.net... ... >> The onus is on the calling code to ensure elaboration happens >> correctly. The best strategy to use from the library-side is to just >> make sure all your code is Preelaborate (or Pure), and the problem >> solves itself. > > This advice probably works in practice, but formally speaking, I cannot > find a promise in the Ada RM (2012 version) that a Preelaborable library > unit is free of elaboration code. You need to look in Annex C, specifically C.4 Preelaboration Requirements But notice that just because a package is preelaborable doesn't automatically mean that no code is generated. That's only true in a limited set of circumstances (as outlined in C.4), and moreover, Annex C is optional so a compiler might not follow this subclause at all. Randy.