[Bug middle-end/43976] warning about increased alignment during casting printed even though variable is properly aligned

thiago at kde dot org gcc-bugzilla@gcc.gnu.org
Tue May 4 19:40:00 GMT 2010



------- Comment #2 from thiago at kde dot org  2010-05-04 19:40 -------
Well, technically f.c has a type of 'char (__attribute__((aligned(4)))) [4]'.

Anyway, the point is that the variable is properly aligned, so the warning is
superfluous.

Or, in other words, we need a way to tell GCC "I know this is properly aligned,
so don't tell me there's a problem". The -Wcast-align warning is very useful to
catch real mistakes, but there's no way to weed out the false positives.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43976



More information about the Gcc-bugs mailing list