[lug] OFF: sizeof structs in gcc?

Holshouser, David dholshou at ball.com
Thu Jun 7 13:11:38 MDT 2001


I am using #pragma pack(1) with an old version of gcc (2.7.2 for vxworks on
a ppc). 
Don't know much about it but that is my setup for the reason as yours.

> -----Original Message-----
> From: Scott A. Herod [mailto:herod at interact-tv.com]
> Sent: Thursday, June 07, 2001 12:51 PM
> To: lug at lug.boulder.co.us
> Subject: [lug] OFF: sizeof structs in gcc?
> 
> 
> Hello,
> 
> This is a kind of off topic but I'm hoping to avoid the gcc lists.
> 
> Is it true that gcc allocates space for objects/stucts in 4 byte
> words?  Is there a way to avoid this?
> 
> Looks like winder's VC has a "#pragma pack" that can compact objects
> but gcc seems to have nothing comparable.  It's not really a problem.
> That's what bcopy is for.  I'm mainly just curious.
> 
> Thanks,
> 
> Scott Herod
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> 



More information about the LUG mailing list