On 01/08/2018 09:28 AM, Philippe Mathieu-Daudé wrote: > Host: Mac OS 10.12.5 > Compiler: Apple LLVM version 8.1.0 (clang-802.0.42) > > slirp/ip6_icmp.c:79:32: warning: taking address of packed member 'ip_src' > of class or > structure 'ip6' may result in an unaligned pointer value > [-Waddress-of-packed-member] > if (IN6_IS_ADDR_MULTICAST(&ip->ip_src) || > ^~~~~~~~~~ > /usr/include/netinet6/in6.h:299:36: note: expanded from macro > 'IN6_IS_ADDR_MULTICAST' > #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
The fact that you replace a macro with a function of exactly the same code in order to avoid a diagnostic sure looks like a compiler bug to me. r~