comp.lang.ada
 help / color / mirror / Atom feed
From: news.crd.ge.com!e7sa!groleau@uunet.uu.net  (Wes Groleau x1240 C73-8)
Subject: Re: Unchecked_Conversion question
Date: 3 Sep 93 20:14:16 GMT	[thread overview]
Message-ID: <CCso7s.IqB@crdnns.crd.ge.com> (raw)

In article <1993Sep1.154715.10498@Rapnet.Sanders.Lockheed.Com> lvonrude@Rapnet.
Sanders.Lockheed.Com (Lowell S. VonRuden x5294) writes:
>   I am doing something that seems to work using a Verdix compiler, but I
>   have not been able to determine if this is something that will be safely
>   transportable.  Hopefully, someone here can tell me.

>   [unchecked conversion does not raise constraint_error, but type conversion
>   does.]

LRM requires type conversions to do constraint checks.  This could
understandably (IMHO) be skipped if the compiler could be certain that the
check is guaranteed to pass.  Obviously, there is no such guarantee for the
output of an unchecked conversion.  If you are using the type conversion to
force the constraint check, I would say that putting  both conversions together
would guarantee that a compliant compiler would do the check at one point or
another.  If you'd like me to try it on VAX Ada, Janus (PC) Ada, Telesoft, or
GNAT, send me enough source code...

A warning about unchecked conversion with Verdix.  We have demonstrated in at
least one case on my current project that an out-of-range value did NOT raise
constraint error when it was assigned to an object.  Although we contended that
LRM 5.2(3) required the constraint check, Verdix claimed that since the value
came from an unchecked conversion (if you traced the logic back to a separately
compiled subprogram) LRM 13.10.2(3) says no check is required.

Wes Groleau

             reply	other threads:[~1993-09-03 20:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-03 20:14 Wes Groleau x1240 C73-8 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-09-04  0:13 Unchecked_Conversion question Robert Dewar
1993-09-03 21:55 Robert Parkhill
1993-09-03 19:51 dog.ee.lbl.gov!agate!howland.reston.ans.net!spool.mu.edu!sdd.hp.com!netwo
1993-09-03 19:06 dog.ee.lbl.gov!agate!spool.mu.edu!umn.edu!email.sp.paramax.com!not-for-ma
1993-09-02 15:43 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!noc.near.net
1993-09-02 13:38 Lowell S. VonRuden x5294
1993-09-02  3:00 Robert Dewar
1993-09-01 16:43 dog.ee.lbl.gov!network.ucsd.edu!news.cerf.net!shrike.irvine.com!adam
1993-09-01 15:47 Lowell S. VonRuden x5294
replies disabled

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