comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: pragma Pack vs. Convention C, portability issue?
Date: Fri, 11 Jan 2008 22:58:47 -0600
Date: 2008-01-11T22:58:47-06:00	[thread overview]
Message-ID: <fm9hen$7jb$1@jacob-sparre.dk> (raw)
In-Reply-To: C3AD79A1.D95EF%yaldnif.w@blueyonder.co.uk

"(see below)" <yaldnif.w@blueyonder.co.uk> wrote in message
news:C3AD79A1.D95EF%yaldnif.w@blueyonder.co.uk...
...
> 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);

Send that to the Dept. of Redundancy Department.

The Pack has (and can have) no effect, so there is no reason to give it.
That was one of the points of contention: if the pragma can have no effect
because of some other reason (by-reference types, atomic types, other rep.
clauses), some of us thought it should be rejected (it seems to promise
something it can't deliver - just ignoring it seems harmful).

My preference is to avoid Pack altogether. (We probably took that too far
with Janus/Ada: we never even implemented it. ;-)

                               Randy.





  parent reply	other threads:[~2008-01-12  4:58 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  4:15     ` Randy Brukardt
2008-01-11  4:15     ` Randy Brukardt
2008-01-11 19:17       ` 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
2008-01-12  4:58     ` Randy Brukardt [this message]
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