Differences between rel1 and rel3

Jason Perry jperry at hanover-square.freeserve.co.uk
Sun Sep 7 14:15:33 PDT 2003


In message <24cd612e4c.peter at chocky.org> you wrote:

> In message <936d612e4c.jperry at hanover-square.freeserve.co.uk>
>           Jason Perry <jperry at hanover-square.freeserve.co.uk> wrote:
> 
> > and lastly, using the __attribute__ ((packed)) for each member of the
> > structure.
> 
> That applies to the structure itself, not the members.  There should be
> examples of its use in the Unixlib headers.
>From the GCC doc:

Here is a structure in which the field `x' is packed, so that it
immediately follows `a':

     struct foo
     {
       char a;
       int x[2] __attribute__ ((packed));
     };

I grepped for this particular attribute in the Unixlib headers and
couldn't find any examples.

Does this mean that this is the right way to go?

I tried applying it to the structure itself, with no apparent effect :-(

-- 
Jason Perry
Please note: This address filters out non-plain text emails



More information about the gcc mailing list