From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9cff4fb5d12e1f68 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Primitive curiosity... References: <447b8b2a-b7bb-4ff5-89bf-a6b7eecc054e@a70g2000hsh.googlegroups.com> In-Reply-To: <447b8b2a-b7bb-4ff5-89bf-a6b7eecc054e@a70g2000hsh.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1221685981 12.201.97.213 (Wed, 17 Sep 2008 21:13:01 GMT) NNTP-Posting-Date: Wed, 17 Sep 2008 21:13:01 GMT Organization: AT&T ASP.att.net Date: Wed, 17 Sep 2008 21:13:01 GMT Xref: g2news2.google.com comp.lang.ada:7761 Date: 2008-09-17T21:13:01+00:00 List-Id: 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