comp.lang.ada
 help / color / mirror / Atom feed
* Preelaboration
@ 2016-05-16 16:26 Simon Wright
  2016-05-16 18:22 ` Preelaboration Jeffrey R. Carter
  2016-05-16 20:28 ` Preelaboration Randy Brukardt
  0 siblings, 2 replies; 7+ messages in thread
From: Simon Wright @ 2016-05-16 16:26 UTC (permalink / raw)


I (think I) need to eliminate elaboration calls in parts of my Cortex
GNAT Runtime Systems project[1], and I'm left with one that I can't
understand.

(1) what does pragma Preelaborate actually mean? I hoped it would mean
"you don't need to elaborate this package".

(2) If you give Preelaborate, is it a compiler error to generate
elaboration code? (the generated elaboration procedure does nothing).

(3) I find ARM 10.2.1(10)[2] unclear (I got here because the problematic
package body instantiates a generic). Does it mean that the
instantiation won't be preelaborable unless all of 10.1 .. 10.4 are
false? Or does it mean that the compiler will make these assumptions
regardless of actuals?

And, looking at (10.1), would you expect

   generic
      type Item is private with Preelaborable_Initialization;
   package Generic_Queues is

to be legal? GNAT rejects it, 'aspect "Preelaborable_Initialization" not
allowed for formal type declaration'.

[1] https://sourceforge.net/projects/cortex-gnat-rts/
[2] http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-10-2-1.html#p10

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-18  0:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16 16:26 Preelaboration Simon Wright
2016-05-16 18:22 ` Preelaboration Jeffrey R. Carter
2016-05-16 19:55   ` Preelaboration Simon Wright
2016-05-16 20:28 ` Preelaboration Randy Brukardt
2016-05-16 21:03   ` Preelaboration Simon Wright
2016-05-17 23:25     ` Preelaboration Randy Brukardt
2016-05-18  0:05       ` Preelaboration Robert A Duff

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