comp.lang.ada
 help / color / mirror / Atom feed
From: Karl Cooper {46901} <ktc@swl.msd.ray.com>
Subject: Re: Valid Attribute and Unchecked Conversion
Date: 1996/10/04
Date: 1996-10-04T00:00:00+00:00	[thread overview]
Message-ID: <32550731.167EB0E7@swl.msd.ray.com> (raw)
In-Reply-To: 53151i$ddd@newsbf02.news.aol.com


John Herro wrote:
> 
> I could be wrong, but I thought that Unchecked_Conversion is erroneous in
> _any_ case.  I heard that the first validated Ada compiler, Ada/Ed, took
> advantage of that fact and generated code to raise Program_Error wherever
> the program tried to make use of Unchecked_Conversion.
> 
> Is this true, and if so, has any of it changed with Ada 95 and the new
> 'Valid attribute?
> 
No, see the Ada83 reference manual 13.10, and the Ada95 reference
manual 13.9 and 13.9.1.  Unchecked_Conversion leads to erroneous
behavior in some cases, but not in others.  In my opinion, the
Ada95 reference manual is clearer when describing the safe uses
of Unchecked_Conversion.

What is true is that an implementation is permitted to place
restrictions on the use of Unchecked_Conversion.  These should
be documented in one of the Appendices which describes the
implementation-dependent things defined by the implementation,
of course.  Again, the Ada95 reference manual gives more insight
into what sort of restrictions might be expected, as well as what
support for Unchecked_Conversion is recommended to implementors.

Because of the additional detail provided in the Ada95 LRM about
the safe uses of Unchecked_Conversion, I would suspect that a
validation suite could be created which would cause the behavior
you describe (unconditional Program_Error for each call to
Unchecked_Conversion) to be a failure of the valildation.
-- 
Karl T. Cooper               
Senior Software Engineer
Raytheon Electronic Systems
ktc@swl.msd.ray.com           <intelligence with intelligibility>




  reply	other threads:[~1996-10-04  0:00 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-22  0:00 Rules for Representation of Subtypes Matthew Heaney
1996-09-23  0:00 ` Robert A Duff
1996-09-24  0:00   ` Matthew Heaney
1996-09-26  0:00     ` Robert A Duff
1996-09-26  0:00       ` Larry Kilgallen
1996-09-27  0:00         ` Robert A Duff
1996-09-27  0:00           ` Mark A Biggar
1996-09-30  0:00             ` Robert A Duff
1996-10-01  0:00               ` Larry Kilgallen
1996-10-01  0:00                 ` Robert A Duff
1996-10-01  0:00                 ` Samuel Tardieu
1996-10-01  0:00                   ` Valid Attribute and Unchecked Conversion Matthew Heaney
1996-10-02  0:00                     ` Robert A Duff
1996-10-04  0:00                       ` Keith Thompson
1996-10-04  0:00                         ` Robert A Duff
1996-10-04  0:00                           ` Robert Dewar
1996-10-11  0:00                             ` Norman H. Cohen
1996-10-12  0:00                               ` Robert Dewar
1996-10-06  0:00                           ` Keith Thompson
1996-10-07  0:00                             ` Robert Dewar
1996-10-09  0:00                               ` Keith Thompson
1996-10-07  0:00                           ` Ken Garlington
1996-10-08  0:00                           ` Alan Brain
1996-10-04  0:00                         ` Matthew Heaney
1996-10-07  0:00                           ` Robert Dewar
1996-10-09  0:00                             ` Keith Thompson
1996-10-07  0:00                         ` Robert Dewar
1996-10-10  0:00                           ` Ken Garlington
1996-10-11  0:00                             ` Robert Dewar
1996-10-14  0:00                               ` Keith Thompson
1996-10-14  0:00                               ` Ken Garlington
1996-10-07  0:00                         ` Kenneth Almquist
1996-10-01  0:00                   ` Rules for Representation of Subtypes Ken Garlington
1996-09-28  0:00           ` Larry Kilgallen
1996-09-29  0:00             ` Robert A Duff
1996-09-29  0:00               ` Larry Kilgallen
1996-09-29  0:00                 ` Matthew Heaney
1996-09-30  0:00                 ` Robert A Duff
1996-10-01  0:00                   ` Ken Garlington
1996-10-02  0:00                     ` Robert A Duff
1996-10-02  0:00                       ` Ken Garlington
1996-10-06  0:00                   ` Robert Dewar
1996-09-29  0:00               ` Matthew Heaney
1996-09-30  0:00                 ` Robert Dewar
1996-09-30  0:00                   ` Matthew Heaney
1996-09-30  0:00                 ` Robert A Duff
1996-10-03  0:00             ` Robert Dewar
1996-10-02  0:00         ` Valid Attribute and Unchecked Conversion George Haddad
1996-10-03  0:00           ` John Herro
1996-10-04  0:00             ` Karl Cooper {46901} [this message]
1996-10-07  0:00               ` Mark A Biggar
1996-10-08  0:00                 ` Robert Dewar
1996-10-05  0:00             ` Robert Dewar
1996-10-06  0:00               ` Keith Thompson
1996-10-14  0:00                 ` Robert A Duff
1996-10-02  0:00         ` Robert I. Eachus
1996-10-02  0:00           ` Matthew Heaney
1996-09-27  0:00       ` Rules for Representation of Subtypes Matthew Heaney
1996-09-27  0:00         ` Robert A Duff
1996-09-23  0:00 ` David C. Hoos, Sr.
1996-09-23  0:00   ` Robert A Duff
1996-09-23  0:00   ` Samuel T. Harris
1996-09-26  0:00     ` David C. Hoos, Sr.
1996-09-24  0:00   ` Robert Dewar
1996-09-26  0:00     ` Keith Thompson
1996-09-26  0:00       ` Matthew Heaney
1996-09-27  0:00         ` Robert Dewar
1996-09-27  0:00         ` Robert A Duff
1996-09-27  0:00           ` Robert Dewar
1996-09-27  0:00       ` Robert A Duff
1996-09-24  0:00   ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-10-03  0:00 Valid Attribute and Unchecked Conversion Franco Mazzanti
1996-10-04  0:00 Franco Mazzanti
replies disabled

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