rogfer01 added a comment.

Forget my wrong comment about packed fields that might actually be aligned. It 
does not make sense.

Regarding the way to selectively disable this, there is little syntax available 
at this point that we can leverage, so I propose to use parentheses as a way to 
disable the warning, e.g. `&a.b` may warn but `&(a.b)` will never warn. This 
may not be ideal but is in practice not that far from the classical `( (x = b) 
)` idiom used to silence the assignment-vs-equality warning.

Closer examination of Firefox code shows that `memcpy`/`memcmp` are used with 
packed members in the networking code. Being able to disable those safe uses by 
means of parentheses seems sensible to me.

I will upload a new patch with this change.


http://reviews.llvm.org/D20561



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to