comp.lang.ada
 help / color / mirror / Atom feed
From: l107353@cliffy.lfwc.lockheed.com (Garlington KE)
Subject: Re: Optimizing and Constraint Checks
Date: 27 Mar 1995 16:58:48 GMT
Date: 1995-03-27T16:58:48+00:00	[thread overview]
Message-ID: <3l6qs8$njp@butch.lmsc.lockheed.com> (raw)
In-Reply-To: 3l3l2v$ria@gnat.cs.nyu.edu

Robert Dewar (dewar@cs.nyu.edu) wrote:
: Wait a moment! In the absence of an numeration rep clause, this whole
: discussion is irrelevant. If you don't have a rep clause, you just use
: Pos and Val to go backwards andd forwards and the whole apparatus of
: the generic is junk!

Yes, I'm assuming it's supposed to support both cases (with and without a
rep clause).

There is one other obscure possibility that can hang this code as well,
even in the absense of a rep spec. A strange compiler could align enum
values in a storage unit differently than for integers. I've never seen
this in practice for enums, although it happens a lot for packed arrays
of BOOLEAN. If the compiler doesn't shift the value on an UNCHECKED_
CONVERSION (which, according to an AI, it's supposed to, although some
don't), then your results are trashed.

--
--------------------------------------------------------------------
Ken Garlington                  GarlingtonKE@lfwc.lockheed.com
F-22 Computer Resources         Lockheed Fort Worth Co.

If LFWC or the F-22 program has any opinions, they aren't telling me.



  reply	other threads:[~1995-03-27 16:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-23 16:04 Optimizing and Constraint Checks Ed Bruce
1995-03-24 13:34 ` Theodore Dennison
1995-03-25 18:09   ` David Wheeler
1995-03-29  0:00   ` Ed Bruce
1995-03-24 20:15 ` Garlington KE
1995-03-26 12:01   ` Robert Dewar
1995-03-27 16:58     ` Garlington KE [this message]
1995-03-29  0:00     ` Ed Bruce
1995-03-29  0:00       ` Garlington KE
1995-03-30  0:00       ` Mike Meier
1995-04-04  0:00       ` Robert Dewar
1995-03-25 17:51 ` Robert Dewar
replies disabled

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