From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT 4.4.5 Record Bit_Order Endian issues
Date: Mon, 21 Jan 2013 18:14:26 -0600
Date: 2013-01-21T18:14:26-06:00 [thread overview]
Message-ID: <kdkll9$k9s$1@munin.nbi.dk> (raw)
In-Reply-To: 9dc6d5fe-3382-44dd-8460-e042bd6b808e@googlegroups.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]
"AdaMagica" <christ-usch.grein@t-online.de> wrote in message
news:9dc6d5fe-3382-44dd-8460-e042bd6b808e@googlegroups.com...
On Saturday, January 19, 2013 2:43:03 AM UTC+1, Stephen Leake wrote:
...
>> Then 13.5.2 talks about the Position attribute.
>> Which just retreives the mysterious "position" number, it doesn't say
>> what it _means_.
Huh? 13.5.2(2/2) says in part:
"denotes Denotes the same value as R.C'Address � R'Address". That makes it
pretty clear what it represents (for the Default_Bit_Order).
For the non-default bit order, it just is whatever you specify (and that's
all we can say,
because it *doesn't* have a clear physical meaning - it defines the machine
scalars to use,
which makes it a totally confusing mess if you try to work the other way).
>> > I agree that the RM is confusing in this area.
>> > It's partly my fault. :-(
>> Ok. What paragraphs do we add? (in five years; better late than never :)
I don't think there is anything that would help. We surely tried when we
created the non-default bit order stuff.
>The AARM helps, but this is of course not a binding standard:
>
>13.5.2(2.a/2) Ramification: {AI95-00133-01} Thus, for the default bit
>order,
>R.C'Position is the offset of C in storage elements from the beginning of
>the object,
>where the first storage element of an object is numbered zero. R'Address +
>R.C'Position = R.C'Address. For record extensions, the offset is not
>measured
>from the beginning of the extension part, but from the beginning of the
>whole object,
>as usual.
>(2.b) In �R.C'Address � R'Address�, the "�" operator is the one in
>System.Storage_Elements that takes two Addresses and returns a
>Storage_Offset.
>
>Why isn't this in the RM itself? An oversight?
It's not necessary, it follows directly from the definition of "-",
'Address, and 'Position as related above, for the default bit order case. In
the non-default bit order, (2.a/2) isn't even true, so it wouldn't help to
add such a statement in that case. ('Position defines the machine scalars to
use in that case, and the meaning defies any simple explanation -- it's
roughly the same as the meaning in the default-bit-order case, but not
exactly. The RM can never lie.)
Randy.
next prev parent reply other threads:[~2013-01-22 0:14 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 17:43 GNAT 4.4.5 Record Bit_Order Endian issues awdorrin
2013-01-15 0:38 ` Randy Brukardt
2013-01-15 1:57 ` Adam Beneschan
2013-01-15 16:57 ` AdaMagica
2013-01-15 22:24 ` Stephen Leake
2013-01-16 10:44 ` Simon Wright
2013-01-16 19:00 ` AdaMagica
2013-01-16 21:34 ` Simon Wright
2013-01-16 23:14 ` Randy Brukardt
2013-01-17 3:49 ` Stephen Leake
2013-01-17 15:32 ` awdorrin
2013-01-18 9:49 ` Stephen Leake
2013-01-18 13:04 ` Robert A Duff
2013-01-19 1:43 ` Stephen Leake
2013-01-19 12:48 ` AdaMagica
2013-01-22 0:14 ` Randy Brukardt [this message]
2013-01-17 17:28 ` Simon Wright
2013-01-18 9:56 ` Stephen Leake
2013-01-17 18:04 ` awdorrin
2013-01-17 19:50 ` awdorrin
2013-01-18 9:58 ` Stephen Leake
2013-01-17 20:58 ` Simon Wright
2013-01-17 21:29 ` awdorrin
2013-01-17 22:16 ` awdorrin
2013-01-18 6:15 ` J-P. Rosen
2013-01-18 15:28 ` Niklas Holsti
2013-01-18 9:37 ` Stephen Leake
2013-01-18 12:24 ` awdorrin
2013-01-18 15:11 ` awdorrin
2013-01-19 1:48 ` Stephen Leake
2013-01-18 17:19 ` Simon Wright
2013-01-22 9:49 ` quinot
2013-01-28 13:39 ` quinot
-- strict thread matches above, loose matches on Subject: below --
2013-01-22 3:21 Stephen Leake
2013-01-22 5:14 ` Jeffrey Carter
2013-01-23 1:29 ` Stephen Leake
2013-01-22 22:40 ` Randy Brukardt
2013-01-23 1:38 ` Stephen Leake
2013-01-23 10:58 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox