
Dear Luigi Mantellini,
In message b73e93990901281416k766b2bf3qc6429f77545f9191@mail.gmail.com you wrote:
I think that an audit of the code is important to understand if we have a problem (or not) and how large is the problem.
We (i. e. all of us except you) do not have a problem.
My compiler is not broken...
Well, YMMV...
cassini linux # find -name *.c -o -name *.h |xargs grep attribute | grep packed | wc -l 3153
I see a lot of packed structs...
Here is for example a copy of /usr/include/netinet/ip.h :
...
This doesn't say anything regarding how kernel guys have resolved the problem (if they are solved...). Checking the kernel headers a lot
This is not a kernel header. This is one of the standard user space network headers, and a pretty central one. Feel free to check any others.
I think that "struct packing" needs to be understood and a global
I agree on this. This definitely needs to be understood.
Hm... I think I understand it, and it works for me :-)
mechanism should be used (like -fpack-struct option always defined or a style guideline that requires a tag for each structs). From my point
I think this is not needed. Please read the docuemntation about alignment and padding. It is pretty clear.
Best regards,
Wolfgang Denk