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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>-mstrict-align

Will not help in this case really as GCC does not warn.

Note clang does warn with -mstrict-align though:
```
<source>:15:18: warning: field C within 'cond_mutex_t' is less aligned than
'pthread_cond_t' and is usually due to 'cond_mutex_t' being packed, which can
lead to unaligned accesses [-Wunaligned-access]
   15 |   pthread_cond_t C;
      |                  ^
```

But I suspect GCC should warn even without strict alignment really.

Reply via email to