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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4a1f5e11494cc9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-27 16:45:06 PST Path: nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!gatech!newsfeed.pitt.edu!uunet!in1.uu.net!world!blanket.mitre.org!linus.mitre.org!spectre!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: GNAT and subunits Date: 27 Mar 1995 22:20:36 GMT Organization: The Mitre Corp., Bedford, MA. Message-ID: References: <3l6j48$82t@ns1.sw-eng.falls-church.va.us> NNTP-Posting-Host: spectre.mitre.org In-reply-to: brashear@ns1.sw-eng.falls-church.va.us's message of 27 Mar 1995 09:46:32 -0500 Date: 1995-03-27T22:20:36+00:00 List-Id: 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...