|
From: Florian K. <fl...@ei...> - 2015-09-14 20:13:14
|
On 14.09.2015 11:32, Mark Wielaard wrote: > > It was an armv7+. But GCC outputs the warning when the backend defines > STRICT_ALIGNMENT to 1. Which arm does unconditionally. It does support > some unaligned access and there is -munaligned-access (which defaults to > 1 when on armv6+). But That seems to be only for some access or some > instructions. I think this explains why: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65459#c4 > Some unaligned accesses might still use instructions that don't support > unaligned access and so trap into the kernel to adjust those. Which will > slow down stuff a lot. So you still get a warning, just in case... I'm not planning to fix the warnings. Some are false positives, others are easy to fix and then some.... However, I believe we should not ship code that, when compiled, spits out loads of warnings. That makes a pretty bad impression. So I'm proposing to not give -Wcast-align when compiling on arm. Any objections? Florian |