This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]