[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#561691: Please declare struct sockaddr and sockaddr_storage as may_alias



On Sun, Dec 27, 2009 at 01:35:43AM +0100, Juliusz Chroboczek wrote:
> > There is no risk of breakage in optimised code with -O2 or more.
> 
> For my education -- could you please explain why?  (No need to quote the
> C99 standard, just give me the intuition.)
> 

It is a false positive due to the fact level 2 is only an approximation
with a lot of false positive. The punn+dereference pattern is handled
correctly by GCC, that's why it does not trigger a warning in level 3
which is more precise.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net



Reply to: