comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Preelaboration
Date: Mon, 16 May 2016 22:03:47 +0100
Date: 2016-05-16T22:03:47+01:00	[thread overview]
Message-ID: <lya8jpoguk.fsf@pushface.org> (raw)
In-Reply-To: nhdai7$d1$1@loke.gir.dk

"Randy Brukardt" <randy@rrsoftware.com> writes:

> In addition, formal types aren't allowed to have language-defined aspects,
> as that would add implicit contracts to the specification (and notably,
> would need rules for those contracts). pragma P_I isn't allowed in a formal
> part, either.

But 10.2.1(10.1), (11.2) explicitly mention P_I in a formal part?

> But this area is complicated (I might be getting it all wrong) and it
> probably doesn't do what you want anyway (Pure/Preelaborable categorizations
> in general were a failure, as they can't be applied to the majority of
> packages). I don't really have any advice, other than if you really care,
> look up the old AIs on the topic.

Thanks for the advice. Things are clearer now, I think; anyway, it turns
out it was indeed the generic that caused the package it was
instantiated in to require elaboration. I expanded the generic (of which
this was the only instance, huh) by hand in the caller, no more
elaboration.

GNAT has a program-unit restriction No_Elaboration_Code[1] which is a
lot closer to what I want. I can't remember now how I got into the state
where the compiler told me I couldn't use it ...

[1] https://gcc.gnu.org/onlinedocs/gnat_rm/No_005fElaboration_005fCode.html


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

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