9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sape Mullender <sape@plan9.bell-labs.com>
To: 9fans@9fans.net
Cc: 9fans@9fans.net
Subject: Re: [9fans] c compiler bug
Date: Wed, 15 Sep 2010 09:06:26 +0200	[thread overview]
Message-ID: <2947a8c22b8274d84c68f633ae888de7@plan9.bell-labs.com> (raw)
In-Reply-To: <AANLkTimNkC82UhS4aUqQd1ewEjxUp5AG5BpAFz4VBrgM@mail.gmail.com>

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: rminnich@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 <brantley@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	other threads:[~2010-09-15  7:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 15:25 erik quanstrom
2010-09-14 20:20 ` Charles Forsyth
2010-09-14 20:59   ` Brantley Coile
2010-09-14 21:07     ` ron minnich
2010-09-15  7:06       ` Sape Mullender [this message]
2010-09-15  8:30         ` Charles Forsyth
2010-09-15  8:37         ` Charles Forsyth
2010-09-15 12:20           ` Charles Forsyth
2010-09-15  8:32       ` Charles Forsyth
2013-02-17  2:38 erik quanstrom
2013-02-18 13:02 ` Comeau At9Fans
2013-02-18 14:38   ` Charles Forsyth
2013-02-18 15:02     ` erik quanstrom
2013-02-18 15:10       ` Charles Forsyth
2013-02-21 17:17       ` Comeau At9Fans
2013-02-21 17:13     ` Comeau At9Fans
2013-02-21 18:13       ` hiro
2013-02-21 18:22         ` John Floren
2013-02-21 18:39           ` erik quanstrom
2013-02-21 18:46             ` Comeau At9Fans
2013-02-21 18:51               ` John Floren
2013-02-21 19:36                 ` hiro
2013-02-21 19:58                   ` andrey mirtchovski
2013-02-21 20:24                     ` Matthew Veety
2013-02-21 20:27                     ` David Leimbach
2013-02-21 20:36                       ` steve
2013-02-21 18:51             ` Kurt H Maier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2947a8c22b8274d84c68f633ae888de7@plan9.bell-labs.com \
    --to=sape@plan9.bell-labs.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).