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!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Can .ads be compiled alone? Date: Fri, 7 Nov 2014 20:01:41 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <520f8f3d-b345-4ef8-ac41-ead78edde92a@googlegroups.com> <92cf9a5a-52f7-4174-85b6-2629ba21d059@googlegroups.com> NNTP-Posting-Host: 24-196-82-226.static.mdsn.wi.charter.com X-Trace: loke.gir.dk 1415412105 11105 24.196.82.226 (8 Nov 2014 02:01:45 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 8 Nov 2014 02:01:45 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:23074 Date: 2014-11-07T20:01:41-06:00 List-Id: "Robert A Duff" wrote in message news:wccppczx79i.fsf@shell01.TheWorld.com... ... >> Did it actually say "compile error"? I get a very different message >> when I try it, and that message *is* further information. >> Specifically, I get this: >> >> cannot generate code for file machinery_1_3.ads (package spec) >> to check package spec for errors, use -gnatc > > Recent versions of gnat leave out the second line above. > It's kind of pointless -- either you saw some error messages > (other than the "cannot generate code" one), or you didn't. > Either way, there's no point in then typing: > > gcc -gnatc -c machinery_1_3.ads > > because you already have the information you were looking for. Not quite true: it's certainly useful for the guy who's writing batch files for new ACATS tests and left out the -gnatc on a package specification (usually of a B-Test). The second part is helpful for such users. (That may be a community of one. ;-) OTOH, most users should be using Gnatmake or GPRBuild to compile things and would never see this message either way; Ada users compiling individual files usually have missed the big picture. (Even for the ACATS, I use Gnatmake to compile ACATS C-Tests. B-Tests unfortunately have to be compiled individually so that the errors can be tied to a particular source unit.) Randy.