comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Unchecked_Conversion vs Address-overlaying
Date: Sun, 26 May 2013 19:33:18 -0700
Date: 2013-05-26T19:33:18-07:00	[thread overview]
Message-ID: <knugdf$u87$1@dont-email.me> (raw)
In-Reply-To: <6bbc35cb-18ed-4efc-b1ec-6c41dcc0256c@googlegroups.com>


On 05/26/2013 04:34 PM, Shark8 wrote:
 >
 >          -- Our undervalued friend, the Nybble and the Byte, as well
 >          -- as a type that serves as a collection of bytes.
 >     Subtype Nybble    is Interfaces.Unsigned_8 Range 16#0#..16#F#;
 >     Subtype Byte    is Interfaces.Unsigned_8;
 >     Type Byte_String is Array(Positive Range <>) of Byte;

If Storage_Element and Unsigned_8 aren't the same size, it's unlikely that the 
overlay will work, given this definition for Byte_String. So why not simply 
assert Storage_Element'Size = 8 and work directly on the elements of Item.all?

-- 
Jeff Carter
"My mind is a raging torrent, flooded with rivulets of
thought, cascading into a waterfall of creative alternatives."
Blazing Saddles
89


  reply	other threads:[~2013-05-27  2:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-26 23:34 Unchecked_Conversion vs Address-overlaying Shark8
2013-05-27  2:33 ` Jeffrey Carter [this message]
2013-05-27  4:37 ` Per Sandberg
replies disabled

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