comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: pragma Pack vs. Convention C, portability issue?
Date: Thu, 10 Jan 2008 22:20:37 -0600
Date: 2008-01-10T22:20:37-06:00	[thread overview]
Message-ID: <fm8e95$q0u$1@jacob-sparre.dk> (raw)
In-Reply-To: a244cc70-8735-468d-a0ad-b2b659b6d58e@v67g2000hse.googlegroups.com

"okellogg" <okellogg@freenet.de> wrote in message
news:a244cc70-8735-468d-a0ad-b2b659b6d58e@v67g2000hse.googlegroups.com...
> -- File: main.adb
> -- Can we portably rely on pragma Pack taking precedence
> -- over Convention C?

The ARG has argued similar questions as part of AI05-0012. And when I say
argue, I meant it -- this was one of the most contentious issues that I can
remember in the ARG. About all we were able to agree on was that the
Implementation Advice for Pack requires things that are impossible. It got
bad enough that we tabled the AI completely; we're not planning to try to
resolve it in the near future.

One of the points of contention was that "best efforts" packing is good
enough (even when the IA says something else). Another point of contention
is whether the pragma should be rejected if "best efforts" packing causes
none at all.

Moral: avoid Pack for anything where the representation matters to
portability. Use 'Component_Size instead.

                                 Randy.





  parent reply	other threads:[~2008-01-11  4:20 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 [this message]
2008-01-11 19:53   ` (see below)
2008-01-12  0:35     ` Adam Beneschan
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