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,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-27 10:28:13 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!lamarck.sura.net!ns1.sw-eng.falls-church.va.us!ns1.sw-eng.falls-church.va.us!not-for-mail From: brashear@ns1.sw-eng.falls-church.va.us (Philip Brashear) Newsgroups: comp.lang.ada Subject: GNAT and subunits Date: 27 Mar 1995 09:46:32 -0500 Organization: None Message-ID: <3l6j48$82t@ns1.sw-eng.falls-church.va.us> NNTP-Posting-Host: ns1.sw-eng.falls-church.va.us Date: 1995-03-27T09:46:32-05:00 List-Id: 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. It is possible (OF COURSE!) that I'm merely being stupid, but I've got a problem with the scenario described below. QUESTION: 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". Can someone convince me that this is OK? Can someone convince me that this is a GOOD THING? Phil Brashear brashepw@msrc.wpafb.af.mil brashear@sw-eng.falls-church.va.us