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,c30642befcd7bf85 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: New GNAT ports (was Re: Ada and Automotive Industry) Date: 1997/01/09 Message-ID: #1/1 X-Deja-AN: 208763155 references: <5asvku$jtu$1@goanna.cs.rmit.edu.au> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1997-01-09T00:00:00+00:00 List-Id: In article <5avdtl$hir$1@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes: > I note that AI-00336/05-ra-WJ says that > "An address clause cannot be given for a subprogram > whose body acts as its declaration." > which I take to mean that a subprogram can have a normal body or > an address clause but not both.... Don't get confused by the RM-speak. All this says is that if you want to have such an address clause, the specification to which it applies must be explicit. In other works: procedure Foo; for Foo'Address use Some_Address; ... procedure body Foo is.... The address clause has to appear after the declaration but before the body, and that is difficult if they are the same unit. (It is also difficult to do right for generic instantiations.) But, as far as I can tell that is an Ada 83 rule only. In Ada 95, an implementation is allowed to--but not required to--support an address clause for an implicitly defined procedure. (But don't hold your breath.) Note also that the addresses are not required by the language to be static. However, a compiler can put in such a restriction. (The sensible choice for an implementation would seem to be to support all address clauses that can be resolved at link-time.) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...