On Wed, Apr 20, 2011 at 12:03 PM, Cary Coutant <ccout...@google.com> wrote: >> This brings out 2 questions. Why don't GCC 4.4/4.6/4.7 warn it? >> Why doesn't 64bit GCC 4.2 warn it? > > Good question. It seems that the difference is whether the compiler > generates a field-by-field copy or a call to memcpy(). According to > David, the trunk gcc in 32-bit mode doesn't call memcpy, but still > doesn't warn. He's looking at it.
It seems to be related to alias rewrite -- the use of single memory token somehow blocks the warning (even though the struct read are SRAed). David > > -cary >