Subject: Re: gcc4 lossage on mips kernels with semi-packed struct
To: Simon Burge <>
From: Matthias Drochner <>
List: tech-toolchain
Date: 05/17/2006 09:24:54
[struct in_addr] said:
>  Add the `packed' attribute to structures which describe wire protocol
> data. 

This is a public structure definition, exported to userland.
If it is mapped onto wire data in the kernel, the kernel should
deal with this in an non-invasive way.

> The "other compiler problems" bit is what I'm concerned about...  Where
> else might we have similar problems in the tree?

What I thought about here was that some compiler on some platform
might not do TRT on eg:
struct in_addr {
	uint32_t s_addr;
}; /* no packed attribute */
struct wiredata {
	char foo;
	struct in_addr addr;
} __attribute__((__packed__));

Don't know whether this is/was the case. Otoh, I can't imagine
another reason why the "packed" was put there.

best regards