comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: An alternative to Unchecked Conversion
Date: 1999/12/19
Date: 1999-12-19T00:00:00+00:00	[thread overview]
Message-ID: <83hh5n$e82$1@nnrp1.deja.com> (raw)
In-Reply-To: 385AD199.D1428985@Boeing.com

In article <385AD199.D1428985@Boeing.com>,
  Rex Reges <Rex.R.Reges@Boeing.com> wrote:
> >      gnat r
You should NEVER use this construction in Ada 83,
since it is erroneous. Whoever tells you in Ada 83
to use this rather than unchecked conversion is
simply not very knowledgable on the language
and should not be payed much attention.

In Ada 95, it is permissible, though implementation
dependent to use address clauses. There is no requirement
that an address clause be static, but there are restrictions
on what expressions are allowed. A compiler is not required
to accept the exact form above, though many, including GNAT
will allow this form.

In GNAT, a specific warning will be given if you do not use
a pragma Import for the overlaying variable and it requires
initialization. Generally the use of a pragma Import is
always appropriate, since what does and does not require
initialization is implementation dependent.


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~1999-12-19  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-16  0:00 An alternative to Unchecked Conversion Tom_Hargraves
1999-12-16  0:00 ` Matthew Heaney
1999-12-16  0:00   ` Richard D Riehle
1999-12-17  0:00     ` Ted Dennison
1999-12-17  0:00       ` Richard D Riehle
1999-12-16  0:00   ` Tom Hargraves
1999-12-16  0:00     ` DuckE
1999-12-16  0:00     ` Matthew Heaney
1999-12-17  0:00       ` Lutz Donnerhacke
1999-12-17  0:00         ` Matthew Heaney
     [not found]     ` <mhrj5s4qckk7rt1j3pu0s3r438e281pu37@4ax.com>
1999-12-17  0:00       ` Simon Wright
     [not found]         ` <g9rr5s84eeov4vvp2v9v70jo9b5uporm0v@4ax.com>
1999-12-20  0:00           ` Simon Wright
1999-12-23  0:00             ` Robert Dewar
1999-12-18  0:00       ` Rex Reges
1999-12-18  0:00         ` Matthew Heaney
1999-12-19  0:00         ` Robert Dewar [this message]
1999-12-20  0:00     ` Charles H. Sampson
1999-12-16  0:00 ` Mark A Biggar
1999-12-16  0:00 ` Jeff Creem
replies disabled

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