comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Why can't objects be static in Ada?
Date: Fri, 12 Apr 2019 09:12:21 +0100
Date: 2019-04-12T09:12:21+01:00	[thread overview]
Message-ID: <lylg0ffxqy.fsf@pushface.org> (raw)
In-Reply-To: f572578d-1e73-4b20-b2be-e5b80a8d95b3@googlegroups.com

Mark Lorenzen <mark.lorenzen@gmail.com> writes:

> On Friday, April 12, 2019 at 12:49:07 AM UTC+2, Randy Brukardt wrote:
>> 
>> fix this. There's no good reason (outside of Annex E issues) for
>> declaring any package preelaborated, unless you like fighting errors
>> a lot. C.4 is a load of hooey, it's not actually implementable on the
>> margins, and there's no reason for any compiler to generate more code
>> than necessary. Ergo, you'll most likely get the same code whether or
>> not you declare something Preelaborated, so why bother with all of
>> the hassles?
>
> For certification purposes, I think there is a value in avoiding
> elaboration code.
>
> http://docs.adacore.com/live/wave/gnat_ugx/html/gnat_ugx/gnat_ugx/support_for_certified_systems.html#avoiding-elaboration-code

This is the GNAT-specific No_Elaboration_Code restriction (and pragma
No_Elaboration_Code_All[1]) which I had to apply to the units involved
in setting up the MCU and arranging to run the compiler-generated
elaboration sequence.

[1]: This is a program unit pragma (there is also an equivalent aspect
of the same name) that establishes the restriction No_Elaboration_Code
for the current unit and any extended main source units (body and
subunits). It also has the effect of enforcing a transitive application
of this aspect, so that if any unit is implicitly or explicitly with’ed
by the current unit, it must also have the No_Elaboration_Code_All
aspect set. It may be applied to package or subprogram specs or their
generic versions.


  reply	other threads:[~2019-04-12  8:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 12:40 Why can't objects be static in Ada? Lucretia
2019-04-11 12:56 ` Mark Lorenzen
2019-04-11 13:31   ` Lucretia
2019-04-11 22:49 ` Randy Brukardt
2019-04-12  1:56   ` Lucretia
2019-04-12  7:33     ` Dmitry A. Kazakov
2019-04-12 22:38     ` Randy Brukardt
2019-04-13  9:14       ` Lucretia
2019-04-12  6:59   ` Mark Lorenzen
2019-04-12  8:12     ` Simon Wright [this message]
2019-04-12 22:02     ` Randy Brukardt
2019-04-13 13:07 ` Jere
2019-04-13 13:48   ` Lucretia
2019-04-15 17:46     ` G. B.
2019-04-14  3:47 ` Keith Thompson
2019-04-16  0:08 ` sbelmont700
2019-04-16  1:40   ` Randy Brukardt
2019-04-16 12:11     ` Mark Lorenzen
2019-04-16 16:19       ` Simon Wright
2019-04-16 20:56       ` Lucretia
2019-04-16 21:07         ` Niklas Holsti
2019-04-16 21:16           ` Lucretia
2019-04-16 21:40             ` Niklas Holsti
2019-04-16 23:26             ` Randy Brukardt
2019-04-23 14:30           ` Mark Lorenzen
2019-04-16 23:09       ` Randy Brukardt
2019-04-22 20:05       ` Norman Worth
2019-04-16 20:54     ` Lucretia
2019-04-16 23:15       ` Randy Brukardt
2019-04-16 20:53   ` Lucretia
2019-04-18 13:32 ` sbelmont700
replies disabled

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