comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: pragma Pack vs. Convention C, portability issue?
Date: Fri, 11 Jan 2008 16:35:15 -0800 (PST)
Date: 2008-01-11T16:35:15-08:00	[thread overview]
Message-ID: <8cbe61c3-4002-4550-b051-53d7b7448bde@k39g2000hsf.googlegroups.com> (raw)
In-Reply-To: C3AD79A1.D95EF%yaldnif.w@blueyonder.co.uk

On Jan 11, 11:53 am, "(see below)" <yaldni...@blueyonder.co.uk> wrote:
> On 11/1/08 04:20, in article fm8e95$q0...@jacob-sparre.dk,
>
> "Randy Brukardt" <ra...@rrsoftware.com> wrote:
>
> > Moral: avoid Pack for anything where the representation matters to
> > portability. Use 'Component_Size instead.
>
> What is the view on combinations like this:
>
>    type seive is array (pos_integral range <>) of Boolean;
>    for  seive'component_size use 8;
>    pragma pack(seive);
>
> or even this:
>
>    type a_set is array (a_member) of Boolean;
>    for  a_set'Component_Size use 1;
>    pragma Pack(a_set);
>    pragma Convention(C, Entity => a_set);

13.2(9) makes me think that the 'Component_Size clause is honored and
the Pack pragma can't change it.

                                 -- Adam



  reply	other threads:[~2008-01-12  0:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  8:40 pragma Pack vs. Convention C, portability issue? okellogg
2008-01-09 16:06 ` Adam Beneschan
2008-01-09 22:12   ` Robert A Duff
2008-01-11  4:15     ` Randy Brukardt
2008-01-11 19:17       ` Randy Brukardt
2008-01-11  4:15     ` Randy Brukardt
2008-01-11  4:15     ` Randy Brukardt
2008-01-10  5:53   ` okellogg
2008-01-11  4:20 ` Randy Brukardt
2008-01-11 19:53   ` (see below)
2008-01-12  0:35     ` Adam Beneschan [this message]
2008-01-12  4:58     ` Randy Brukardt
2008-01-11 22:46   ` Robert A Duff
replies disabled

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