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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Can .ads be compiled alone? Date: Sun, 23 Nov 2014 23:34:23 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <520f8f3d-b345-4ef8-ac41-ead78edde92a@googlegroups.com> <5c1c28a5-6149-4dd4-bdc8-9cbe86dbc705@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Mon, 24 Nov 2014 06:34:11 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6bb4f0a3c21c874c69dbcaa30e818f24"; logging-data="19125"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196XJu9K1XZ9P0x/7Dz47YM/ez2TCMjnqY=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <5c1c28a5-6149-4dd4-bdc8-9cbe86dbc705@googlegroups.com> Cancel-Lock: sha1:oXo1rxjmofqsVG+FhZr20sZQWPM= Xref: news.eternal-september.org comp.lang.ada:23683 Date: 2014-11-23T23:34:23-07:00 List-Id: On 11/23/2014 08:16 PM, rriehle@itu.edu wrote: > On Saturday, November 15, 2014 11:16:50 AM UTC-8, Robert A Duff wrote:>> >> rriehle@itu.edu writes: >> >>> The code you just posted is directly copied from Ada Distilled. The >>> specification will compile just fine since it is only a specification. >>> You must compile the specification before the body. They should be >>> compiled separately. >> >> That depends on the compiler. Some Ada compilers work the way you >> describe above. GNAT does not. >> >> Not[e] that in GNAT, there are no requirements on compilation order. >> > All the code in Ada Distilled was compiled with GNAT. Much of it used AdaGide for the editor. I think you two are talking at cross purposes. I'm sure Riehle did pass all of his specs through the compiler separately from their bodies. This can be done with the -gnatc switch, and does not generate any object code (or it can be done without that switch, in which case it emits an error msg about not being able to generate code for a spec). I suspect that he calls this "compiling the spec". I suspect that Duff calls it syntax checking, and reserves "compiling" for generating object code. Let me know if I'm anywhere near the mark. -- Jeff Carter "I'm particularly glad that these lovely children were here today to hear that speech. Not only was it authentic frontier gibberish, it expressed a courage little seen in this day and age." Blazing Saddles 88