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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,28b389d4503cb555 X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: generic package dilemma Date: 1999/11/19 Message-ID: <3835CF6B.C78469E@mitre.org>#1/1 X-Deja-AN: 550718792 Content-Transfer-Encoding: 7bit References: <80u48b$ghr$1@bunyip.cc.uq.edu.au> <3832e27f_1@news1.prserv.net> <3832E75D.5B1BA719@mail.com> <383319e8_4@news1.prserv.net> <3833F615.5AD7166C@mail.com> <383442e1_1@news1.prserv.net> <383510EA.9DFEE8B6@mail.com> <383569db_2@news1.prserv.net> <81449o$1fh$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 943050237 20042 129.83.41.77 (19 Nov 1999 22:23:57 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 19 Nov 1999 22:23:57 GMT Newsgroups: comp.lang.ada Date: 1999-11-19T22:23:57+00:00 List-Id: Robert Dewar wrote: > It's really a rule rather than a guideline, at least for new > code, although GNAT will indeed provide the necessary implicit > Elaborate_All statements if you leave them out! > > The rule is simple, if you instantiate a generic from within > elaboration code, then you must use a pragma Elaborate_All > on the generic. There are very special cases where you should use Elaborate instead of Elaborate_All, and I occasionally run into them when creating mutually recursive types. But in general use Elaborate_All unless you know when not to. ;-) These cases can occur with generics, but that is very rare. (Two generic units can not directly have mutually dependent bodies, but they can an indirect dependence through other units where the body of C must be elborated after A and after B, where A and B are the generics.) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...