comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Elaboration_check For Instantiations
Date: 1997/10/24
Date: 1997-10-24T00:00:00+00:00	[thread overview]
Message-ID: <EIK5DE.JpG.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 1997Oct23.205254.25272@nosc.mil


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




  reply	other threads:[~1997-10-24  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-23  0:00 Elaboration_check For Instantiations Charles H. Sampson
1997-10-23  0:00 ` Charles H. Sampson
1997-10-24  0:00   ` Tucker Taft [this message]
1997-10-24  0:00     ` Robert Dewar
1997-10-27  0:00       ` Charles H. Sampson
1997-10-27  0:00         ` Robert Dewar
1997-10-28  0:00           ` Charles H. Sampson
1997-10-28  0:00             ` Keith Thompson
1997-10-28  0:00               ` Charles H. Sampson
1997-10-29  0:00                 ` W. Wesley Groleau x4923
1997-10-29  0:00                   ` Tom Moran
1997-10-30  0:00                     ` Larry Kilgallen
1997-10-30  0:00                   ` Charles H. Sampson
     [not found]                   ` <345774b3.1434102@santaclara01.news.internex.net>
1997-10-30  0:00                     ` Charles H. Sampson
1997-10-29  0:00                 ` Robert Dewar
1997-10-29  0:00                   ` Charles H. Sampson
1997-10-29  0:00             ` Robert Dewar
1997-10-27  0:00     ` Charles H. Sampson
1997-10-27  0:00       ` Robert Dewar
1997-10-24  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox