comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: Primitive curiosity...
Date: Wed, 17 Sep 2008 21:13:01 GMT
Date: 2008-09-17T21:13:01+00:00	[thread overview]
Message-ID: <xpeAk.291973$TT4.240985@attbi_s22> (raw)
In-Reply-To: <447b8b2a-b7bb-4ff5-89bf-a6b7eecc054e@a70g2000hsh.googlegroups.com>

mockturtle wrote:
> 
> Is this actually implied by the RM description or is gcc
> being strict? (Maybe "immediately within" was given a
> technical sense, but I was not able to find the definition)
> 
> Why this?  There is some deep technical reason or is it
> just to enforce the programmer to be "order" and declare
> primitive subprograms close to the type definition?

This has to do with "freezing". When a type is frozen, all primitive operations 
of the type have been declared.

See ARM 3.9.2.13: "The explicit declaration of a primitive subprogram of a 
tagged type shall occur before the type is frozen (see 13.14). For example, new 
dispatching operations cannot be added after objects or values of the type 
exist, nor after deriving a record extension from it, nor after a body."

Deriving an extension from the type freezes it.

-- 
Jeff Carter
"Apart from the sanitation, the medicine, education, wine,
public order, irrigation, roads, the fresh water system,
and public health, what have the Romans ever done for us?"
Monty Python's Life of Brian
80



  reply	other threads:[~2008-09-17 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 20:29 Primitive curiosity mockturtle
2008-09-17 21:13 ` Jeffrey R. Carter [this message]
2008-09-17 21:19 ` Adam Beneschan
2008-09-18 19:27   ` mockturtle
2008-09-24 14:02   ` Martin
replies disabled

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