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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d2cba5965c7bfcd5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-04 02:29:50 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: 64bit access to an array of 8bit values Date: 4 Mar 2002 02:29:49 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0203040229.6ffc7ee3@posting.google.com> References: <3C823A1A.6030006@users.sf.net> <0CFB5EECF8614F8D.52C8F36A468D2F14.3AD3D533D2B72FDB@lp.airnews.net> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015237789 1294 127.0.0.1 (4 Mar 2002 10:29:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Mar 2002 10:29:49 GMT Xref: archiver1.google.com comp.lang.ada:20753 Date: 2002-03-04T10:29:49+00:00 List-Id: "John R. Strohm" wrote in message news:<0CFB5EECF8614F8D.52C8F36A468D2F14.3AD3D533D2B72FDB@lp.airnews.net>... > The short answer is that you can't do what you want to > do. short, but wrong :-) > > The Ada compiler is not required to allocate precisely > one byte per array element, Well you can perfectly well use for x'component_size use 8; to enforce that > and it probably didn't. Yes, of course it did > Instead, it will probably allocate one > "word" per array element, No, of course it won't > because word access is probably faster than byte > access. Not on any machine the questioner is likely to be using. This post sure had a lot of misinformation. Have not seen yet whether there is anything useful in the rest of the posts. The previous post about storage pools was even more irrelevant. The right answer of course is to use unchecked conversion, and you can quite easily do what you want. There is nothing wrong with pointer conversion when it makes sense.