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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6a9844368dd0a842 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: seperate keyword and seperate compilation with Gnat? Date: 1996/07/08 Message-ID: #1/1 X-Deja-AN: 167552873 references: <4rrcal$hhh@newsbf02.news.aol.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-08T00:00:00+00:00 List-Id: John Herro said When generating code for the parent, the compiler has to include the enumeration identifier names in the object code because the separate procedure might use CLA_Message_Type'Image or CLA_Message_Type'Value. In this case, Janus/Ada has a pragma for the user to tell the compiler that the program will *not* use 'Image or 'Value for a particular enumeration type. GNAT has this pragma, since it is defined in Ada 95, it is called Discard_Names. Permit me to offer a suggestion, even though I have to admit that I don't have the Gnat compiler. (I'm paying America Online 5 cents a minute for access, and have no idea what it would cost me to download ez2load - I know, I should get a *real* ISP!) How about a pragma or compiler switch to tell Gnat that the whole program won't use tasking? Then it could generate efficient code for the parent before the subunit is written, and wouldn't have to recompile the parent when the subunit changes. GNAT has this pragma, since it is defined in Ada 95, it is called Restrictions, and can restrict tasking and many other things. But that only partially solves the subunit problem (it solves the tasking case, which is one of many similar problems, in the case of non-tasking programs only).