comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: New GNAT ports (was Re: Ada and Automotive Industry)
Date: 1997/01/09
Date: 1997-01-09T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.97Jan9150113@spectre.mitre.org> (raw)
In-Reply-To: 5asvku$jtu$1@goanna.cs.rmit.edu.au


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...




  parent reply	other threads:[~1997-01-09  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-24  0:00 New GNAT ports (was Re: Ada and Automotive Industry) Robert Dewar
1996-12-27  0:00 ` New GNAT ports John Howard
1997-01-07  0:00 ` New GNAT ports (was Re: Ada and Automotive Industry) Richard A. O'Keefe
1997-01-07  0:00   ` Ken Garlington
1997-01-08  0:00     ` Richard A. O'Keefe
1997-01-08  0:00       ` Robert Dewar
1997-01-09  0:00         ` Richard A. O'Keefe
1997-01-11  0:00           ` Robert Dewar
1997-01-11  0:00         ` Addresses of Subprograms (was: New GNAT ports) Larry Kilgallen
1997-01-13  0:00           ` Larry Kilgallen
1997-01-14  0:00             ` Richard A. O'Keefe
1997-01-14  0:00               ` Fergus Henderson
1997-01-15  0:00             ` Richard Kenner
1997-01-09  0:00       ` New GNAT ports (was Re: Ada and Automotive Industry) Ken Garlington
1997-01-07  0:00   ` Robert Dewar
1997-01-08  0:00     ` Richard A. O'Keefe
1997-01-08  0:00       ` Robert Dewar
1997-01-08  0:00     ` Ken Garlington
1997-01-07  0:00   ` Robert A Duff
1997-01-07  0:00     ` Robert Dewar
1997-01-08  0:00     ` Richard A. O'Keefe
1997-01-09  0:00       ` Dr. Peter E. Obermayer
1997-01-08  0:00   ` Karl Cooper
1997-01-08  0:00     ` Robert Dewar
1997-01-09  0:00     ` Richard A. O'Keefe
1997-01-09  0:00       ` Robert Dewar
1997-01-09  0:00   ` Robert I. Eachus [this message]
1997-01-10  0:00   ` Robert I. Eachus
1997-01-11  0:00     ` Robert Dewar
1997-01-13  0:00       ` Richard A. O'Keefe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox