comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: GNAT and subunits
Date: 27 Mar 1995 22:20:36 GMT
Date: 1995-03-27T22:20:36+00:00	[thread overview]
Message-ID: <EACHUS.95Mar27172036@spectre.mitre.org> (raw)
In-Reply-To: brashear@ns1.sw-eng.falls-church.va.us's message of 27 Mar 1995 09:46:32 -0500

In article <3l6j48$82t@ns1.sw-eng.falls-church.va.us> brashear@ns1.sw-eng.falls-church.va.us (Philip Brashear) writes:

  > I'm posting this rather than sending it to gnat-report because
  > it's a far more general question that should be considered by
  > people outside the GNAT project.

    Send it to gnat-report.

  > Is GNAT's processing of subunits really in accordance with
  > language rules?

    The model chosen for GNAT is perfectly acceptable, but it is not
one I would choose for an "industrial strength" compiler.  Fine, GNAT
is aimed at education and casual users first and foremost.

 > More importantly, is it in accordance with the spirit and intent of separate
 > compilation?

    No, but it is not intended to be.  Separate compilation is a tool
which is appropriate for some environments and some types of projects.
It is not appropriate for everything.  The GNAT team decided that in
their envirionment supporting the required syntax and semantics while
not providing the intended model, gave them some useful freedom of
design. You get improved code quality, you waste some time recompiling
code--it's a trade-off.

 > Here's my problem: I have a program (Prog) with a subunit
 > (procedure Sub).  When I compile Prog, GNAT requires me to provide
 > a file containing Sub.  OK, I can live with that -- I'll just
 > provide a stub.  So, compiling shows me that my interfaces are
 > pretty much correct.  I link and execute.

 > Now, I complete Sub (in the file Prog-Sub.adb).  If I just submit
 > Prog-Sub.adb to the compiler (as is my usual habit, and, I think,
 > the common way of doing things), I get the usual "No code generated
 > ... " message.  I now link and execute.  Guess what!  The STUB
 > version of Sub is still used!  That is, re-compiling the separate
 > subprogram (alone) does not appear to affect the "library".

   This sounds like a bug, but I, and I think the people at NYU would
need more details to be sure.

 > Can someone convince me that this is OK?

  I won't try...

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...



  parent reply	other threads:[~1995-03-27 22:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-27 14:46 GNAT and subunits Philip Brashear
1995-03-27 21:12 ` Michael Feldman
1995-03-28 12:58   ` Philip Brashear
1995-04-04  0:00     ` Robert Dewar
1995-03-27 22:20 ` Robert I. Eachus [this message]
1995-03-28  0:00 ` Robert Dewar
1995-03-30  0:00   ` Tucker Taft
1995-04-01  0:00     ` Michael Feldman
1995-03-28 16:57 ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox