From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: GNAT 4.4.5 Record Bit_Order Endian issues
Date: Sat, 19 Jan 2013 04:48:11 -0800 (PST)
Date: 2013-01-19T04:48:11-08:00 [thread overview]
Message-ID: <9dc6d5fe-3382-44dd-8460-e042bd6b808e@googlegroups.com> (raw)
In-Reply-To: <85k3ra2biw.fsf@stephe-leake.org>
On Saturday, January 19, 2013 2:43:03 AM UTC+1, Stephen Leake wrote:
> Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> > Stephen Leake <stephen_leake@stephe-leake.org> writes:
> >> component_clause ::=
> >> component_local_name at position range first_bit .. last_bit;
> >> But I could find no definition of "position"!
> > The very next paragraph defines the syntax:
> > position ::= static_expression
> That doesn't say "position is the number of storage_units from the start
> of the record" (there's probably a better definition in Cohen's paper).
> For all I can tell from the ARM, "position" could be a color number, or
> the number of angels on the head of a pin!
> Then 13.5.2 talks about the Position attribute.
> Which just retreives the mysterious "position" number, it doesn't say
> what it _means_.
> > 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 :)
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?
next prev parent reply other threads:[~2013-01-19 12:48 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 [this message]
2013-01-22 0:14 ` Randy Brukardt
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