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,ASCII Path: g2news1.google.com!postnews.google.com!v41g2000yqv.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: bit numbers in packed arrays of Boolean Date: Tue, 31 Aug 2010 06:57:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <82r5hfghjr.fsf@stephe-leake.org> <8e4b6rF1dlU1@mid.individual.net> <108mw0hcfwlnl.1klsp2e3omofa.dlg@40tude.net> NNTP-Posting-Host: 20.133.0.13 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1283263023 26506 127.0.0.1 (31 Aug 2010 13:57:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 31 Aug 2010 13:57:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v41g2000yqv.googlegroups.com; posting-host=20.133.0.13; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:13876 Date: 2010-08-31T06:57:03-07:00 List-Id: On Aug 31, 2:40=A0pm, Yannick Duch=EAne (Hibou57) wrote: > A tricky and imaginary example by the way: imagine a clever compiler with= =A0 > clever optimization, which would detect the application mostly access the= =A0 > nth item of the array and far less oftenly access any other items, now le= t =A0 > say the target CPU has a special instruction to access bit value at #0 = =A0 > (common practice on CISC processor), then it could choose to map this nth= =A0 > item on bit #0. > > Do you feel the language would disallow such an optimization ? if it does= =A0 > not, this example shows this is implementation defined. I think this would be a very bad idea. My first reaction involved "deserving a good kicking", perhaps that's a little extreme.