This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/43976] warning about increased alignment during casting printed even though variable is properly aligned
- From: "thiago at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2010 19:40:00 -0000
- Subject: [Bug middle-end/43976] warning about increased alignment during casting printed even though variable is properly aligned
- References: <bug-43976-7726@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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