From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Unchecked_Conversion vs Address-overlaying Date: Sun, 26 May 2013 19:33:18 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <6bbc35cb-18ed-4efc-b1ec-6c41dcc0256c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 27 May 2013 02:29:05 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="656ea2f23126f57fb36504d2d15a002c"; logging-data="30983"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RCA8PANzKwTdjPxCkxu3QVkzeY6ZXJB4=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <6bbc35cb-18ed-4efc-b1ec-6c41dcc0256c@googlegroups.com> Cancel-Lock: sha1:MoUwGxJXTCl3CtySkPSsfZkWdIQ= X-Original-Bytes: 1942 Xref: number.nntp.dca.giganews.com comp.lang.ada:181744 Date: 2013-05-26T19:33:18-07:00 List-Id: 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