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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3a414836333dfef7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-11 11:25:44 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Elaboration in GNAT Date: 11 Jan 2002 11:25:43 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0201111125.703ec50d@posting.google.com> References: <1006952193.650930@edh3> <5ee5b646.0111281125.7e9fbca3@posting.google.com> <1010151875.216658@edh3> <5ee5b646.0201041640.71e8c7c5@posting.google.com> <1010411468.548451@edh3> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1010777144 25466 127.0.0.1 (11 Jan 2002 19:25:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 11 Jan 2002 19:25:44 GMT Xref: archiver1.google.com comp.lang.ada:18792 Date: 2002-01-11T19:25:44+00:00 List-Id: Frode Tenneboe wrote in message news:<1010411468.548451@edh3>... > I realize that it is not necesarily true in all cases, > but won't the compiler be able to detect if pragma EB is > appropriate? No, because it cannot see the body in question > > I find the section starting with "The rule is simple.", > > second from bottom on page 119 in the GNAT 3.13p UG to be > quite concise. Well I don't have that version of the UG in front of me, but if it is about EB, it is probably wrong. Early versions of GNAT were definitely too ready to believe that the EB pragma gave some useful guarantees when in fact it does not. It is not better than a pragma Elaborate (as opposed to Elaborate_All). If a package uses something at run time from an Elaborate_Body package, then it cannot know what is in the body, so in the general case you still need a pragma Elaborate_All in such a case (and one will be supplied automatically when using the GNAT standard static approach).