From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Can .ads be compiled alone?
Date: Fri, 07 Nov 2014 12:26:53 -0500
Date: 2014-11-07T12:26:53-05:00 [thread overview]
Message-ID: <wcclhnmyl9e.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: m3hnlm$f44$2@dont-email.me
Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org> 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
next prev parent reply other threads:[~2014-11-07 17:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 5:21 Can .ads be compiled alone? moixa
2014-11-07 6:09 ` Jeffrey Carter
2014-11-07 17:26 ` Robert A Duff [this message]
2014-11-07 17:41 ` Jeffrey Carter
2014-11-07 6:20 ` J-P. Rosen
2014-11-07 7:48 ` Chris Moore
2014-11-07 14:54 ` Tero Koskinen
2014-11-07 15:49 ` Björn Lundin
2014-11-07 16:29 ` G.B.
2014-11-08 13:01 ` moixa
2014-11-08 14:55 ` G.B.
2014-11-07 16:29 ` G.B.
2014-11-07 16:44 ` Adam Beneschan
2014-11-07 17:14 ` Shark8
2014-11-08 21:31 ` Chris Moore
2014-11-07 16:50 ` Adam Beneschan
2014-11-07 17:14 ` Robert A Duff
2014-11-08 2:01 ` Randy Brukardt
2014-11-15 12:54 ` rriehle
2014-11-15 19:17 ` Robert A Duff
2014-11-15 19:19 ` Robert A Duff
2014-11-17 15:52 ` Adam Beneschan
2014-11-17 0:07 ` rriehle
2014-11-17 6:50 ` Simon Wright
2014-11-24 3:16 ` rriehle
2014-11-24 6:34 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox