comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: Rep-spec question
Date: 1999/11/11
Date: 1999-11-11T00:00:00+00:00	[thread overview]
Message-ID: <yecogd0pmc2.fsf@king.cts.com> (raw)
In-Reply-To: 80cqb7$if9$1@nnrp1.deja.com

Ted Dennison <dennison@telepath.com> writes:
> In article <80clr0$etf$1@nnrp1.deja.com>,
[...]
> The implementation advice in question (from 13.3) is:
> 
> ---
> The recommended level of support for the Size attribute of objects is:
> 
> A Size clause should be supported for an object if the specified Size is
> at least as large as its subtype's Size, and corresponds to a size in
> storage elements that is a multiple of the object's Alignment (if the
> Alignment is nonzero).
> ---

Which raises some interesting questions.  This implies that an
implementation that follows the advice must accept the following:

    N : Integer;
    for N'Size use 1_000_000 * Integer'Size;

(assuming sufficient memory).  Where do the significant bits go?  What
if N is aliased, and you create a pointer to it (think about
endianness)?  If you pass N as a parameter, how many bits are actually
passed?

I think there's an AI that modifies the above advice.  As I recall, it
says that an implementation needn't accept a size clause for an
integer object if the specified size is bigger than the size of the
largest supported integer type.  (This could still make things
interesting if, for example, Short_Integer is 16 bits, and you declare
a Short_Integer object specified to be 32 or 64 bits, especially on a
big-endian machine.)  I'm too lazy to look up the AI; perhaps someone
else can do so.

-- 
Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
"Oh my gosh!  You are SO ahead of your time!" -- anon.




  reply	other threads:[~1999-11-11  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-10  0:00 Rep-spec question Joe Wisniewski
1999-11-10  0:00 ` Tucker Taft
1999-11-11  0:00   ` Robert A Duff
1999-11-10  0:00 ` Ted Dennison
1999-11-10  0:00   ` Joe Wisniewski
1999-11-10  0:00     ` Ted Dennison
1999-11-11  0:00       ` Keith Thompson [this message]
1999-11-12  0:00         ` Robert Dewar
1999-11-12  0:00         ` Robert A Duff
1999-11-12  0:00         ` Nick Roberts
1999-11-11  0:00       ` Robert A Duff
1999-11-12  0:00         ` Robert Dewar
1999-11-11  0:00       ` Robert Dewar
1999-11-11  0:00         ` Ted Dennison
1999-11-12  0:00           ` Robert Dewar
1999-11-10  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