From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Record representation : components order
Date: Sun, 05 Jul 2009 10:10:57 -0400
Date: 2009-07-05T10:10:57-04:00 [thread overview]
Message-ID: <uocrz6wzy.fsf@stephe-leake.org> (raw)
In-Reply-To: 908a786e-214e-436f-868b-c0ead259fcc5@r33g2000yqn.googlegroups.com
"Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr> writes:
> Going on in section 13, I did no see about record components order
> apart the “ at X range Y .. Z ” which directly specify it.
>
> But looking at some design in some place in the web, people usually do
> this way : define some component type with a size clause, and then,
> just use these type in some records, most of time, without using any “
> at X range Y .. Z ” . But to me, this seems to be unsafe, beceause
> components order is not guaranted to be that of the declaration.
You are correct.
If your application requires a specific component order, you must
specify the order in a record representation clause.
Anything else is compiler dependent.
Note that Ada 2005 allows specifying bit field placement using
endian-independent bit numbers.
--
-- Stephe
next prev parent reply other threads:[~2009-07-05 14:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-04 21:08 Record representation : components order Hibou57 (Yannick Duchêne)
2009-07-05 3:14 ` Hibou57 (Yannick Duchêne)
2009-07-05 10:16 ` sjw
2009-07-06 7:33 ` Stephen Leake
2009-07-07 19:37 ` sjw
2009-07-09 9:28 ` Stephen Leake
2009-07-09 19:16 ` sjw
2009-07-10 5:26 ` Stephen Leake
2009-07-06 7:29 ` Stephen Leake
2009-07-06 8:07 ` Jean-Pierre Rosen
2009-07-05 14:10 ` Stephen Leake [this message]
2009-07-06 2:57 ` Hibou57 (Yannick Duchêne)
2009-07-06 8:27 ` Jacob Sparre Andersen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox