[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2c0942db0612050828s1780acefu53dcfd31c88116c0@mail.gmail.com>
Date: Tue, 5 Dec 2006 08:28:55 -0800
From: "Ray Lee" <madrabbit@...il.com>
To: "Kristian Høgsberg" <krh@...hat.com>
Cc: "Benjamin Herrenschmidt" <benh@...nel.crashing.org>,
linux-kernel@...r.kernel.org,
"Stefan Richter" <stefanr@...6.in-berlin.de>
Subject: Re: [PATCH 0/3] New firewire stack
On 12/4/06, Kristian Høgsberg <krh@...hat.com> wrote:
> Ok... I was planning to make big-endian versions of the structs so that the
> endian issue would be solved. But if the bit layout is not consistent, I
> guess bitfields are useless for wire formats. I didn't know that though, I
> thought the C standard specified that the compiler should allocate bits out of
> a word using the lower bits first.
The C standard explicitly allows it to be implementation defined.
Having been bit by this exact problem, I can also recommend never
using bitfields for anything other than things kept solely in local
memory.
Ray
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists