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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b657b1c99e7e7039 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: bit numbers in packed arrays of Boolean Date: Tue, 31 Aug 2010 13:34:00 +0200 Organization: Ada @ Home Message-ID: References: <82r5hfghjr.fsf@stephe-leake.org> NNTP-Posting-Host: phGk+NigveeXIQAZXtx21g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.61 (Win32) Xref: g2news1.google.com comp.lang.ada:13870 Date: 2010-08-31T13:34:00+02:00 List-Id: Le Tue, 31 Aug 2010 13:14:48 +0200, Stephen Leake = a =C3=A9crit: > LRM 13.9(5) says Bit_Array_16_Type and Unsigned_16 have the same > representation, but it does not specifically address the index order. At least ARM 3.6 Array Types does not states anything. But as you used = Unchecked_Conversion, it is unlikely to be portable or this result could= = be enforced. Let say this is the result of a compiler with descent defau= lt = behaviors. ARM 13.9 Unchecked Type Conversions says: 11.a/2 Implementation defined: The effect of unchecked conversion f= or instances with nonscalar result types whose effect is not defined by= the language. And do not believe the reference defines anything for an array of 16 = bit-layout booleans. Possibly depends on how the index is interpreted: as an index in the = polynomial representation of the word value or as a bit index ? Both wou= ld = be legitimate for a compiler. That was my humble opinion on the topic. -- = =E2=80=9CDual licensing is the Perl's way to disinfect the GNU General P= ublic = Virus!=E2=80=9D (anonymous)