comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Can .ads be compiled alone?
Date: Fri, 7 Nov 2014 08:44:00 -0800 (PST)
Date: 2014-11-07T08:44:00-08:00	[thread overview]
Message-ID: <74cb6762-39cc-45c8-af78-7e18a3192f49@googlegroups.com> (raw)
In-Reply-To: <m3imev$pe4$1@loke.gir.dk>

On Friday, November 7, 2014 6:54:24 AM UTC-8, Tero Koskinen wrote:
> 7.11.2014 9:48, Chris Moore wrote:
> > You cannot generate code from a spec.
> 
> I think this isn't true anymore for Ada 2012?

I don't think it was true for Ada 83.  I can compile this, and there are no warning or other messages:

    with Foo;
    pragma Elaborate(Foo);
    package Pack1 is
        X : Integer := Foo.My_Function;
    end Pack1;

If I add anything to this source (e.g. a procedure declaration) that causes a package body to be required, I do get "cannot generate code".  Your source falls into the same category; your spec doesn't require (or allow) a body, therefore there is no message.

                             -- Adam

  parent reply	other threads:[~2014-11-07 16:44 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
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 [this message]
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