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-28 08:57:39 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!lll-winken.llnl.gov!noc.near.net!inmet!spock!stt From: stt@spock.camb.inmet.com (Tucker Taft) Subject: Re: GNAT and subunits Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <3l6j48$82t@ns1.sw-eng.falls-church.va.us> Date: Tue, 28 Mar 1995 16:57:39 GMT Date: 1995-03-28T16:57:39+00:00 List-Id: Philip Brashear (brashear@ns1.sw-eng.falls-church.va.us) wrote: : ... : Is GNAT's processing of subunits really in accordance with language rules? : More importantly, is it in accordance with the spirit and intent of separate : compilation? : 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. Unfortunately, it is a bit hard to know because it may depend on what you mean by "submit" a file to GNAT. : Can someone convince me that this is OK? No, it sounds like a bug, unless your notion of what it means to "submit" a file to GNAT disagrees with their notion. The key principle in GNAT is that the sources are what matters. If you update a source file, then at link-time, it should provide a mode where it complains if the sources and the object modules are inconsistent. : Can someone convince me that this is a GOOD THING? I would put your energy into getting the GNAT folks to fix the bug. I presume you have already tried gnat-report@cs.nyu.edu ... : Phil Brashear : brashepw@msrc.wpafb.af.mil : brashear@sw-eng.falls-church.va.us -Tucker Taft stt@inmet.com Intermetrics, Inc.