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,e5eb8ca5dcea2827 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Ada OO Mechanism Date: 1999/06/08 Message-ID: <1999Jun8.151014.1@eisner>#1/1 X-Deja-AN: 487193175 X-Nntp-Posting-Host: eisner.decus.org References: <7i05aq$rgl$1@news.orbitworld.net> <7i17gj$1u1k@news2.newsguy.com> <7icgkg$k4q$1@nnrp1.deja.com> <3749E9EC.2842436A@aasaa.ofe.org> <7id2eo$fag@drn.newsguy.com> <3749FF7D.F17CE16A@aasaa.ofe.org> <374AC676.F7AE0772@lmco.com> <7ieuja$5v9@news1.newsguy.com> <7ifd6l$bmf@sjx-ixn1.ix.netcom.com> X-Trace: news.decus.org 928869020 19124 KILGALLEN [216.44.122.34] Organization: Digital Equipment Computer User's Society Followup-To: Newsgroups: comp.lang.ada Date: 1999-06-08T00:00:00+00:00 List-Id: Reply-To: Kilgallen@eisner.decus.org.nospam Organization: LJK Software Lines: 25 In article , Hyman Rosen writes: > Matthew Heaney writes: >> On 07 Jun 1999 15:26:52 -0400, Hyman Rosen wrote: >> However, the declaration >> declare >> S : String := Func_Return_String; >> begin >> is perfectly legal, and so is the declaration >> declare >> O : T'Class := Func_Return_T_Tic_Class; >> begin >> In neither case is heap required. > > And despite that, you said before that the size of O is determined > at run-time, not at compile-time. Also, I looked at some of the code > generated by GNAT, and saw references to a secondary_stack_allocate > (or something like that) function. So the storage for S and O is > allocated somewhere, but it's on the stack? Is this something like > alloca? The fact that GNAT allocates it in one place does not mean all compilers will do it in the same place. Is your question specifically "how does GNAT do this ?" ? Larry Kilgallen