I agree; packed data structures are a really bad idea.  They're used
to match some hardware representation of some data structures and
that's not good: It's the compiler's prerogative to decide just how
the fields should be packed so therefore, the construct is never portable.
This is why we have nhgets, nhgetl, nhgetv and hnputs, hnputl, hnputv.

Packed data structures are for lazy people and lazy people get punished.

        Sape

> From: rminn...@gmail.com
> To: 9fans@9fans.net
> Reply-To: 9fans@9fans.net
> Date: Tue Sep 14 23:09:35 CES 2010
> Subject: Re: [9fans] c compiler bug
> 
> On Tue, Sep 14, 2010 at 1:59 PM, Brantley Coile <brant...@coraid.com> wrote:
> > I've a need for the pragma.  We're using it.  That's how I found the 
> > problem.
> > bwc
> 
> 
> I can tell you that people who use this sort of thing at some point
> discover it's not really what they wanted. They end up writing
> functions to more or less do the same thing. I'm not sure you want to
> go down this path.
> 
> Example: Xen 2 used __attribute__ packed heavily, realized at some
> point it was a bad idea, and took another path.
> 
> ron

Reply via email to