https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71120

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Actually the bug is in the testcase as it aggregate-copies

struct sockaddr_storage
  {
    sa_family_t ss_family;
    unsigned long int __ss_align;
    char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];
  };

where by C rules an aggregate copy copies each field and thus leaves padding
undefined.

Thus this is a libc bug of having padding between ss_family and __ss_align.

And thus this has nothing to do with strict aliasing.  It's rather a glibc
bug (or specification bug wherever sockaddr_storage is specified).

Reply via email to