IN6_IS_ADDR_* macros use invalid type punning?
Maxim Dounin
mdounin at mdounin.ru
Thu Jun 6 23:34:45 UTC 2013
Hello!
On Thu, Jun 06, 2013 at 10:23:30PM +0200, Matthias Andree wrote:
> I am just staring at gcc 4.8 warnings when compiling the try.c code
> shown below:
[...]
> try.c:9:5: warning: dereferencing type-punned pointer will break
> strict-aliasing rules [-Wstrict-aliasing]
> int r = IN6_IS_ADDR_V4MAPPED((&sin6.sin6_addr));
> ^
> try.c:9:5: warning: dereferencing type-punned pointer will break
> strict-aliasing rules [-Wstrict-aliasing]
[...]
> Can we get these fixed in a reasonable timeframe?
>
> To whom, or where, would I submit a patch for all the macros so that it
> actually gets committed to HEAD and MFC'd to /9 and /8?
Gleb already committed a fix for this 16 months ago
(unfortunately, correct patch description was lost in transit):
http://svnweb.freebsd.org/base?view=revision&revision=230584
Probably it's a good idea to MFC the fix.
--
Maxim Dounin
http://nginx.org/en/donation.html
More information about the freebsd-net
mailing list