comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Converting C++ class to Ada
Date: 1996/12/20
Date: 1996-12-20T00:00:00+00:00	[thread overview]
Message-ID: <E2q4Ds.942@world.std.com> (raw)
In-Reply-To: 32BAB8C8.7046@gsfc.nasa.gov


In article <32BAB8C8.7046@gsfc.nasa.gov>,
Stephen Leake  <Stephen.Leake@gsfc.nasa.gov> wrote:
>I can't find a rule in the RM that says this.

Yeah, it's not easy to find.  :-(

Basically, lots of the rules about checks on parameter passing,
assignment, etc., are defined in terms of type conversion.  E.g. an
actual parameter is always implicitly converted to the type of the
formal (6.4.1(11)).  Then 4.6 specifies all the run-time checks for
conversions, including this null check.

Also, the *literal* null is illegal for these types.

It would have been helpful if we had said "An access param/discrim can
never be null." somewhere as a NOTE, instead of letting you figure it
out.  A statement like that is a lot more useful (though less specific)
than telling which combination of compile-time and run-time rules ensure
that it's true.  That is, to the programmer, the rule is "don't try to
make one of these things null", and it's not really important to know
the exact points of checking.  The compiler writer of course has to know
the details.

- Bob




  reply	other threads:[~1996-12-20  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-10  0:00 Converting C++ class to Ada Ken Garlington
1996-12-11  0:00 ` Larry Kilgallen
1996-12-11  0:00 ` Stephen Leake
1996-12-13  0:00   ` Stephen Leake
1996-12-11  0:00 ` Norman H. Cohen
1996-12-12  0:00   ` Jon S Anthony
1996-12-11  0:00 ` Jon S Anthony
1996-12-12  0:00   ` Ken Garlington
1996-12-18  0:00   ` Jon S Anthony
1996-12-18  0:00     ` Matthew Heaney
1996-12-19  0:00     ` Robert A Duff
1996-12-20  0:00       ` Stephen Leake
1996-12-20  0:00         ` Robert A Duff [this message]
1996-12-20  0:00   ` Jon S Anthony
1996-12-20  0:00     ` Mitch Gart
1996-12-20  0:00   ` Norman H. Cohen
1996-12-21  0:00   ` Jon S Anthony
1996-12-12  0:00 ` Dale Stanbrough
1996-12-12  0:00   ` Constructors for Ada (was: Converting C++ class to Ada) Matthew Heaney
1996-12-13  0:00     ` Norman H. Cohen
1996-12-13  0:00       ` Matthew Heaney
1996-12-17  0:00   ` Robert I. Eachus
replies disabled

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