Thread (13 messages) 13 messages, 5 authors, 2007-02-20

Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.

From: Jeremy Fitzhardinge <hidden>
Date: 2007-02-16 00:13:50
Also in: lkml

Andrew Morton wrote:
hm.  So if I have

	struct bar {
		unsigned long b;
	} __attribute__((packed));

	struct foo {
		unsigned long u;
		struct bar b;
	};

then the compiler can see that foo.b.b is well-aligned, regardless of the
packedness.
In Ralf's code, the structure is anonymous, and is used to declare a
pointer type, which is initialized from a void *.  So I think the
compiler isn't allowed to assume anything about its alignment.

    J
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help