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,5f9c25380ec58962 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.190.99 with SMTP id gp3mr4140239pbc.1.1326581192644; Sat, 14 Jan 2012 14:46:32 -0800 (PST) Path: lh20ni182702pbb.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Elaboration circularity with generics Date: Sat, 14 Jan 2012 22:46:31 +0000 Organization: A noiseless patient Spider Message-ID: References: <583b1bfe-95bd-4669-b16b-c733c81e8f88@w4g2000vbc.googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="29888"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cRykps+L7SZGfRdkRra3F7WjElCy6WMc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:NCEtoC6/w78C6ST9Y+wC2T5bB/k= sha1:F/PNNrS+pNZa1BcDCk01vmzrtL8= Content-Type: text/plain; charset=us-ascii Date: 2012-01-14T22:46:31+00:00 List-Id: AdaMagica writes: > A unit can only be instantiated if it is fully elaborated. > I guess GNAT chose the elaboration order P'Spec, P.Q'Spec, P'Body > (crash since P.Q'body is not elaborated). > This dependence is not present for nongeneric units. > > Perhaps addition of pragma Elaborate_Body to P.Q helps. with P.Q; pragma Elaborate (P.Q); <<<<<<< does the trick for me package body P is I have to say that elaboration problems are often mindboggling (the best I remember was when GNAT 3.09 reported an elaboration cycle of 157 where there were only 156 units in the program).