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,55f243f32a97dc7e X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Elaboration_check For Instantiations Date: 1997/10/24 Message-ID: #1/1 X-Deja-AN: 284717919 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <1997Oct23.205254.25272@nosc.mil> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-10-24T00:00:00+00:00 List-Id: Charles H. Sampson (csampson@cod.nosc.mil) wrote: : Sigh. When I said that my sample code was legal in Ada 83, I : thought I saw some loose wording in the LRM that would allow it, al- : though it appeared that the intent was to discourage it, at the least. : Now, however, it seems to be illegal in Ada 83 as well, by 3.9(7). Actually, it is not illegal. It "simply" raises Program_Error at run-time (in Ada 83 and Ada 95), due to violating the checks regarding access before elaboration. In any case, there was no change in the rules in this area between Ada 83 and Ada 95. Apparently the wording in Ada 95 is clearer on the subject (at least to you ;-). : When I said that it worked in several compilers, I know of at : least three. When I said that a healthy body of code exists using the : "feature", that body includes a large number of packages supplied by an : Ada compiler vendor! Well, then I guess these compilers all had a common bug. Alternatively, the code was compiled with Elaboration_Check suppressed. You could add "pragma Suppress(Elaboration_Check);" to the above code, and it would probably not raise Program_Error (though it would then be officially erroneous, per RM95 11.5(26)). : Charlie : -- : ****** : If my user name appears as "csampson", remove the 'c' to get my : correct e-mail address. -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA