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,CP1252 X-Google-Thread: 103376,d6f7b92fd11ab291 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-18 22:25:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3F18D647.9020505@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Crosspost: Help wanted from comp.compilers References: <3F158832.1040206@attbi.com> <1058378673.35463@master.nyc.kbcfp.com> <1058390613.119827@master.nyc.kbcfp.com> <2OERa.4718$0F4.3216@nwrdny02.gnilink.net> <1058539398.178565@master.nyc.kbcfp.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 66.31.71.243 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc53 1058592337 66.31.71.243 (Sat, 19 Jul 2003 05:25:37 GMT) NNTP-Posting-Date: Sat, 19 Jul 2003 05:25:37 GMT Organization: Comcast Online Date: Sat, 19 Jul 2003 05:25:37 GMT Xref: archiver1.google.com comp.lang.ada:40495 Date: 2003-07-19T05:25:37+00:00 List-Id: Hyman Rosen wrote: > 10.1.4/5 says > When a compilation unit is compiled, all compilation units > upon which it depends semantically shall already exist in > the environment; > > Where does it say that when a compilation unit is compiled all > compilation units which depend on it must be recompiled? It DOESN'T! What you want is found in 10.2(27): "The implementation shall ensure that all compilation units included in a partition are consistent with one another, and are legal according to the rules of the language." I won't go very deeply into why an environment is allowed to contain illegal units. (It supports certain types of version control systems.) But the result is that an environment may contain many mutually illegal compilation units. The process of creating a partition (think linking) is only allowed to select a set of mutually legal and consistant units. Now go back to 10.1.4(5), when you compile a compilation unit, "all compilation units on which it depends semantically shall already exist in the environment." So if you (successfully) recompile a unit on which another unit semantically depends, those two units are now mutually illegal. How do you fix that? You recompile the dependent unit. Got it? But why am I spending this effort responding to a troll? I guess because I like to see this newsgroup as a resource for people learning Ada, or interested in learning it better. And that requires some attempts to preserve the ability to get accurate answers here. This is a very subtle area of the reference manual, because it simultaneously wants to allow the widest possible array of configuration management approaches, while having some very strict rules about consistancy of programs. So environments are, as you will see if you read all of clause 10, welcome to contain inconsistant and illegal compilation units. Partitions and programs are not. So we went to a lot of effort to word this part of the manual so that an environment is not required to "throw away" compilation units, but the process of putting together a program or partition must do that weeding. You can have two versions of a library unit in the environment, one old, one new, and two different main programs in the environment, where it is possible to construct legal partitions around these main programs one that contains the old version of the library unit, one that contains the new. All that is intentional, and I do have some environments that I use that way. (Multiple main programs with possibly mutually inconsistant subunits. Usually the difference is that one set of library units is compiled with -gnata, the other without.) -- Robert I. Eachus �In an ally, considerations of house, clan, planet, race are insignificant beside two prime questions, which are: 1. Can he shoot? 2. Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and Steve Miller.