comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Why no constraint error?
Date: 1997/03/24
Date: 1997-03-24T00:00:00+00:00	[thread overview]
Message-ID: <E7J0vD.GxB.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: E7GAL1.1Ky@world.std.com


Robert A Duff (bobduff@world.std.com) wrote:

: In article <E7G5q1.J8q.0.-s@inmet.camb.inmet.com>,
: Tucker Taft <stt@houdini.camb.inmet.com> wrote:
: >Well Bob, I believe GNAT is technically right in this one, ...

: Can you quote chapter and verse, to show where my analysis was wrong?
: (Legalistically, I mean -- ignoring issues of what's
: desirable/efficient/etc.)

I guess I agree with you, that presuming 13.9.1(10) applies, then
"deinitializing" an initialized scalar variable is a no-no.

You would have to invoke 13.9.1(11) and claim that the uninitialized
representation was so weird that it didn't correspond to a value of
the type, and hence you could legitimately propagate it on assignment
(so long as the optimizer didn't forget that the LHS is now potentially
deinitialized as well).

I think the simpler choice is to prevent initialized scalars from
becoming deinitialized, and that seems to be what 13.9.1(10) is requiring.

A subtler question is whether an assignment from an uninitialized
scalar to another uninitialized scalar can be allowed to leave the
LHS still having an invalid representation.  13.9.1(10) seems to
say "no," any assignment must leave the LHS with a valid representation
(unless the RHS is an unchecked conversion or call on an imported 
function, per 13.9.1(12)).

: - Bob

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




  reply	other threads:[~1997-03-24  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-20  0:00 Why no constraint error? Samuel Mize
1997-03-20  0:00 ` Samuel Mize
1997-03-21  0:00   ` Robert A Duff
1997-03-22  0:00     ` Tucker Taft
1997-03-22  0:00       ` Robert A Duff
1997-03-24  0:00         ` Tucker Taft [this message]
1997-03-24  0:00       ` Samuel A. Mize
1997-03-24  0:00         ` Robert Dewar
1997-03-24  0:00         ` Robert A Duff
1997-03-24  0:00           ` Robert Dewar
1997-03-22  0:00     ` Robert Dewar
1997-03-22  0:00       ` Robert A Duff
replies disabled

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