comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: The Incredible Shrinking Type
Date: Tue, 07 Nov 2000 00:04:03 GMT
Date: 2000-11-07T00:04:03+00:00	[thread overview]
Message-ID: <8u7gte$7ie$1@nnrp1.deja.com> (raw)
In-Reply-To: 3A0703F5.9333AE56@earthlink.net

In article <3A0703F5.9333AE56@earthlink.net>,
  "Marc A. Criley" <marccriley@earthlink.net> wrote:

> However, when passing an instance of this type as a parameter
to a procedure and
> extracting its 'Size, the result is 64.  What happened to the
rest of the bits?
> Granted, they were unused, but still...  Where is this
behavior addressed by the
> language (if it is), or is it a freedom granted to compiler
implementor's?


You are making the common mistake of confusing the size of
a type with the size of objects of the type. Specifying the
size of a type only affects packing and unchecked conversion
in Ada 95 semantics. It does not determine the size of
objects of the type, and there is no requirement that the
size of all objects of the type be the same.

So the real issue here is what you have read in the RM that
implies that the above behavior is expected or not expected.
Actually asking for more than 64 bits for a scalar type is
a bit peculiar anyway (and way out of the portable behavior
required by the RM).


Sent via Deja.com http://www.deja.com/
Before you buy.



  reply	other threads:[~2000-11-07  0:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-06  0:00 The Incredible Shrinking Type Marc A. Criley
2000-11-07  0:04 ` Robert Dewar [this message]
2000-11-07  0:00   ` Nicolas Brunot
2000-11-07  0:00     ` Robert Dewar
2000-11-08  0:00       ` Nicolas Brunot
2000-11-09  5:41         ` Robert Dewar
2000-11-07  0:00   ` Marc A. Criley
2000-11-07  0:00     ` 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