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!feeder.eternal-september.org!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Can .ads be compiled alone? Date: Fri, 07 Nov 2014 12:26:53 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <520f8f3d-b345-4ef8-ac41-ead78edde92a@googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1415381189 15395 192.74.137.71 (7 Nov 2014 17:26:29 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 7 Nov 2014 17:26:29 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:DAjh8j0lwLzWKjJHTTuJOs0F5ac= Xref: news.eternal-september.org comp.lang.ada:23069 Date: 2014-11-07T12:26:53-05:00 List-Id: Jeffrey Carter writes: > This is an idiosyncrasy of GNAT's source-based compilation model. Yes, that's the way GNAT works, but I don't think it's directly related to the source-based model. AdaMagic uses a source-based model, but you have to compile package specs. I don't know of any compilers that use a non-source-based model and behave like GNAT w.r.t. package specs, but I don't see why it couldn't be done. >... When you > compile something that withs a package, GNAT also looks at the source file for > the pkg spec. So GNAT normally only compiles a pkg body; typically the message > when one tries to compile a spec that has a body is something like "cannot > produce object code for a package specification" (I haven't tried it recently). > You can check a pkg spec that has a body with -gnatc, Yes, and you can also do that withOUT -gnatc. ;-) >...and compile a spec that > doesn't have a body, or compile a spec along with its body by compiling the body. > > Other compilers have other ways of dealing with this, and require that a pkg > spec be compiled before you can compile something that withs it. Yup. The Ada RM doesn't define how compilers are invoked and so on -- that's up to the individual Ada implementation. - Bob