Jack Howarth wrote:
Is there some place where all the existing forms of strict-aliasing
warnings are documented? So far I have only seen the error...
We don't have such documentation unfortunately. There are 3 errors.
There is the one you have seem. There is a similar one for incomplete
types, which says "might break" instead of "will break" because whether
there is a problem depends on how the type is completed.
There is also a third error which occurs only with -Wstrict-aliasing=2,
which again says "might break" instead of "will break". This option
will detect more aliasing problems than just -Wstrict-aliasing, but it
also may report problems where they don't exist. Or in other words, for
ambiguous cases where the compiler can't tell if there may or may not be
an aliasing problem, -Wstrict-aliasing will give no warning, and
-Wstrict-aliasing=2 will give a warning.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com