Messages in this thread | | | Date | Tue, 27 Oct 2009 17:59:40 -0700 (PDT) | Subject | Re: [PATCH] perf tools: Kill off -Wcast-align | From | David Miller <> |
| |
From: Ingo Molnar <mingo@elte.hu> Date: Tue, 27 Oct 2009 14:50:25 +0100
> Generally if you run into such issues in Sparc let us know so we can fix > it :-)
Sorry, I wanted to do a thorough analysis to make sure I understood why it was warning, but I was too busy to do so.
In the end the issue is the kernel list.h macros like list_entry(), and it would similarly trigger for things like container_of().
If you have a pointer to a structure with objects other than "long double" then cast it to a pointer to a structure that does have a "long double" in it, this increases the alignment of the type (from 8 to 16 bytes on sparc 32-bit).
| |