From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Import a type from C
Date: 08 Nov 2002 09:51:28 -0500
Date: 2002-11-08T15:02:26+00:00 [thread overview]
Message-ID: <uznsk6rnz.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: wcclm45jqrw.fsf@shell01.TheWorld.com
Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> "Frank J. Lhota" <NOSPAM.lhota.adarose@verizon.net> writes:
>
> > ...only the crude pack pragma / command line option ...
>
> What's the "pack pragma". Is this standard C, or something supported by
> some C compilers? (Which compilers?)
gcc supports "__attribute__ ((packed))". It applies to structs, or
fields within structs (not arrays).
I'm on a flight project that has a lot of inherited C code, and some
new Ada code (all by me). The previous project used -fpacked command
line flag for all the C code. But we are also switching operating
systems, and the new one can't tolerate -fpacked. So we have to add
__attribute__ ((packed)) all over the place. But some people want to
run unit tests using Microsoft Visual C (why, I'm not sure :). So we
use a #define to get rid of the __attribute__.
I keep saying "see how much easier this is in Ada". Some of them are
beginning to hear it :).
--
-- Stephe
next prev parent reply other threads:[~2002-11-08 14:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-06 19:48 Import a type from C Francisco Santoyo
2002-11-06 20:06 ` Frank J. Lhota
2002-11-06 23:10 ` Stephen Leake
2003-01-08 20:46 ` Rupert Pigott
2003-01-10 3:48 ` Eric G. Miller
2003-01-14 4:47 ` David Thompson
2002-11-07 7:16 ` Victor Porton
2002-11-07 13:47 ` Stephen Leake
2002-11-07 16:03 ` Frank J. Lhota
2002-11-07 16:20 ` Robert A Duff
2002-11-08 14:51 ` Stephen Leake [this message]
2002-11-07 19:00 ` chris.danx
2002-11-08 4:02 ` Victor Porton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox