Re: [PATCH] perf tools: Kill off -Wcast-align

From: David Miller
Date: Tue Oct 27 2009 - 20:59:27 EST


From: Ingo Molnar <mingo@xxxxxxx>
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).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/