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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!A.ISI.EDU!GOODENOUGH From: GOODENOUGH@A.ISI.EDU (John B. Goodenough) Newsgroups: comp.lang.ada Subject: Re: obsolete vs. removed from the library Message-ID: <8703172243.AA21683@ucbvax.Berkeley.EDU> Date: Wed, 11-Mar-87 17:29:23 EST Article-I.D.: ucbvax.8703172243.AA21683 Posted: Wed Mar 11 17:29:23 1987 Date-Received: Thu, 19-Mar-87 01:33:33 EST References: <12284668975.9.BRYAN@Sierra.Stanford.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet List-Id: Doug Bryan asked a question using the following example: package P is end P; with P; procedure Q is begin null; end; package P is end P; with P; procedure Q is begin null; end; He asserted that "the second compilation of P ... makes the implicit specification of Q (which is in the library) obsolete." He then went on to ask "Does this mean that the second compilation of the body of Q is invalid since it is a secondary unit of an obsolete spec?" The problem with this question is that it's based on an invalid assumption, namely, that there is an implicit specification for procedure Q that is the library unit. I can well understand why Doug may have this interpretation, since it was my understanding of the RM at one time also, but when the Language Maintenance Panel/Committee considered this issue (in AI-00199), it concluded that there is no implicit specification for procedure Q that serves as a library unit; instead, procedure Q's body is itself the library unit. Specifically, AI-00199 says: A subprogram body given in a compilation unit (following the context clause) is interpreted as a secondary unit if the program library already contains a subprogram declaration or generic subprogram declaration with the same identifier; it is otherwise interpreted as a library unit. Now the consequences of this approved interpretation are that when P is recompiled, library unit Q is made obsolete, so the second compilation of procedure Q must be accepted; it is not a secondary unit of an obsolete (implicit) specification. "Obsolete" and "not in the library" are semantically equivalent, although a given implementation may treat these states differently. (In particular, an implementation might "recompile" very quickly units that are obsolete, but physically "in the library".) -------