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 X-Google-Thread: 103376,3a414836333dfef7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-07 05:51:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.bredband.com!bredband!luth.se!erix.ericsson.se!newstoo.ericsson.se!not-for-mail From: Frode Tenneboe Newsgroups: comp.lang.ada Subject: Re: Elaboration in GNAT Date: 7 Jan 2002 13:28:02 GMT Organization: Ericsson Radar AS Message-ID: <1010411468.548451@edh3> References: <1006952193.650930@edh3> <5ee5b646.0111281125.7e9fbca3@posting.google.com> <1010151875.216658@edh3> <5ee5b646.0201041640.71e8c7c5@posting.google.com> NNTP-Posting-Host: edh3.edh.ericsson.se Mime-Version: 1.0 Content-Type: text/plain; charset=ISO Content-Transfer-Encoding: 8bit User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u)) Cache-Post-Path: edh3!unknown@alne X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Xref: archiver1.google.com comp.lang.ada:18597 Date: 2002-01-07T13:28:02+00:00 List-Id: Robert Dewar wrote: > Frode Tenneboe wrote in message news:<1010151875.216658@edh3>... >> However, I find the above warning a bit misplaced in my >> case. I would have preferred: >> >> bar.adb:69:04: warning: instantiation of "Client" may raise Program_Error >> bar.adb:69:04: warning: missing pragma Elaborate_Body in spec > Well perhaps you would have preferred that the compiler > tell you this, but it won't because it is wrong! The use > of a EB pragma in the spec is not an adequate solution > for this case! 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? 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. >> I'm also unsure if this is always true, but > >> alternatively: > It is not always true My problems mainly comes from generic units which is repeatedly used around everywhere with nesting, etc. If I start from the bottom and use pure/preelaborate where possible and if the warning dissappears after using EB pragma - am I home safe? >> foo.adb:69:04: warning: instantiation of "Client" may raise Program_Error >> foo.adb:69:04: warning: missing pragma Elaborate_All for "bar" or >> foo.adb:69:04: warning: missing pragma Elaborate_Body in "bar" > This is getting two separate things mixed up I am afraid. Possibly - could you please elaborate? :) I'm trying to convey that both solutions might solve the 'problem'. For the user the most desireable would (probably) be to fix the problem in the client. -Frode -- ^ Frode Tenneb� | email: ft@edh.ericsson.se ^ | Ericsson Radar AS. N-1788 Halden | | | Phone: +47 69 21 41 47 | Frode@IRC | | with Standard.Disclaimer; use Standard.Disclaimer; |