From: "Steve" <nospam_steved94@comcast.net>
Subject: Re: What is correct way to pack records
Date: Fri, 19 Nov 2004 03:08:30 GMT
Date: 2004-11-19T03:08:30+00:00 [thread overview]
Message-ID: <Osdnd.115795$R05.75566@attbi_s53> (raw)
In-Reply-To: 3046atF2qaqsjU1@uni-berlin.de
Just to complicate matters, with Microsoft C/C++ you have pragmas:
#pragma pack(1)
So that the packing in the C code may be varied.
Steve
(The Duck)
"Marc A. Criley" <mcNOSPAM@mckae.com> wrote in message
news:3046atF2qaqsjU1@uni-berlin.de...
> "Jeffrey Carter" <spam@spam.com> wrote:
>
> > Marc A. Criley wrote:
> >
> > > Yes. Though it carries some baggage that may or may not matter to
you.
> > >
> > > pragma Convention(C, MyRec);
> >
> > This may guarantee the order, but it doesn't guarantee packing, and the
> > results may vary from one compiler to another.
>
> Correct, that's why it's essential that the layout of the record
definition
> be verified against the file record layout.
>
> I my experience (with GNAT and Rational Apex) I find that "Convention C"
> does do the "right" thing, especially since it's supposed to conform to
how
> a C compiler would lay out the data.
>
> Marc
>
>
next prev parent reply other threads:[~2004-11-19 3:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 0:20 What is correct way to pack records Warren O. Merrill
2004-11-18 0:27 ` Jeffrey Carter
2004-11-18 6:50 ` Martin Dowie
2004-11-18 12:37 ` Stephen Leake
2004-11-18 17:04 ` Marc A. Criley
2004-11-18 17:31 ` Jeffrey Carter
2004-11-18 18:00 ` Marc A. Criley
2004-11-19 3:08 ` Steve [this message]
2004-11-19 12:44 ` Frank J. Lhota
2004-11-19 13:28 ` Marc A. Criley
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox