Packing structures with gcc

From: Robert Rati <hidden>
Date: 2000-10-05 23:15:13

Hi all

I am trying to read a byte stream into a structure and padding shifts
the members of the structure. How do I turn on packing of the structures
to ensure no padding. I am working with gcc version 2.95.3 on a Linux
ppc distribution with 2.2.13 kernel and glibc 2.1.3.  I have tried using
the -fpack-struct option with no luck.  Are there options to the
standard binary distributions of gcc for struct packing, or do I need to
compile gcc from source?  I have tried compiling gcc 2.95.3 with compile
version 2.95.3 and I get an internal compiler error.  Upon looking at
the gcc source, it appears that HANDLE_SYSV_PRAGMA needs to be defined
(according to c-pragma.h), but how would I configure the makefiles in
the gcc source to enable this option correctly?  Would appreciate any
help with this.

Thanks
Rob

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help