comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Elaboration Question
Date: Mon, 5 Jan 2015 20:33:13 -0600
Date: 2015-01-05T20:33:13-06:00	[thread overview]
Message-ID: <m8fhha$1ig$1@loke.gir.dk> (raw)
In-Reply-To: cgoihuF7sr6U1@mid.individual.net

"Niklas Holsti" <niklas.holsti@tidorum.invalid> 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.



  reply	other threads:[~2015-01-06  2:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-02  3:27 Elaboration Question Hubert
2015-01-02  7:56 ` Simon Wright
2015-01-02 22:16   ` Randy Brukardt
2015-01-02 14:49 ` Brad Moore
2015-01-02 11:08   ` Mark Lorenzen
2015-01-02 13:35     ` David Botton
2015-01-02 15:11     ` sbelmont700
2015-01-02 21:57       ` Niklas Holsti
2015-01-06  2:33         ` Randy Brukardt [this message]
2015-01-06  8:17           ` Niklas Holsti
2015-01-06 20:06             ` Randy Brukardt
2015-01-03  9:45 ` Jean François Martinez
2015-01-03  9:50   ` Hubert
2015-01-03 18:43     ` Jean François Martinez
2015-01-04  1:57       ` Hubert
2015-01-04 12:05       ` Simon Wright
replies disabled

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