comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Preelaboration
Date: Mon, 16 May 2016 17:26:58 +0100
Date: 2016-05-16T17:26:58+01:00	[thread overview]
Message-ID: <lymvnqnf3h.fsf@pushface.org> (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

             reply	other threads:[~2016-05-16 16:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 16:26 Simon Wright [this message]
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
replies disabled

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