comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: bit numbers in packed arrays of Boolean
Date: Tue, 31 Aug 2010 13:34:00 +0200
Date: 2010-08-31T13:34:00+02:00	[thread overview]
Message-ID: <op.viavqyjmule2fv@garhos> (raw)
In-Reply-To: 82r5hfghjr.fsf@stephe-leake.org

Le Tue, 31 Aug 2010 13:14:48 +0200, Stephen Leake  
<stephen_leake@stephe-leake.org> a écrit:
> 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 default  
behaviors.

ARM 13.9 Unchecked Type Conversions says:

    11.a/2  Implementation defined: The effect of unchecked conversion for
    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 would  
be legitimate for a compiler.

That was my humble opinion on the topic.


-- 
“Dual licensing is the Perl's way to disinfect the GNU General Public  
Virus!” (anonymous)



  reply	other threads:[~2010-08-31 11:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31 11:14 bit numbers in packed arrays of Boolean Stephen Leake
2010-08-31 11:34 ` Yannick Duchêne (Hibou57) [this message]
2010-08-31 12:34 ` Niklas Holsti
2010-08-31 12:41   ` Yannick Duchêne (Hibou57)
2010-08-31 13:08     ` Dmitry A. Kazakov
2010-08-31 13:40       ` Yannick Duchêne (Hibou57)
2010-08-31 13:57         ` sjw
2010-08-31 14:07         ` Dmitry A. Kazakov
2010-08-31 14:30         ` Niklas Holsti
2010-09-02 20:09   ` Randy Brukardt
2010-08-31 18:13 ` Jeffrey Carter
replies disabled

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