f/sta.c:340: warning: dereferencing type-punned pointer will break strict-aliasing rules
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon Nov 25 06:08:00 GMT 2002
Mark Mitchell <mark@codesourcery.com> writes:
| --On Saturday, November 23, 2002 05:26:28 PM +0100 Toon Moene
| <toon@moene.indiv.nluug.nl> wrote:
|
| > L.S.,
| >
| > Could someone, with larger knowledge of C, ook into this warning and see
| > if it is reasonable ?
|
| I think it's a false positive warning, but I think most of the aliasing
| warnings are going to have high false positive rates. (Which is why I'm
| not a big fan of those warnings...)
|
| The compiler's complaining because the code is casting
|
| struct _ffesta_possible_root_ *
|
| to a:
|
| struct _ffesta_possible_ *
|
| In this case, the warning is particularly silly because the latter is
| the prefix portion of the former.
Right, the warning is really silly in that case. Maybe the
type-punning detection machinery should be mabe aware of that rule..
But as you I'm not a big fan of that warning in the first place so it
will probably end up with low priority in my bucket.
-- Gaby
More information about the Gcc
mailing list