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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also DATA_ALIGNMENT (and LOCAL_ALIGNMENT) does not conflict with `pragma pack`.

The documentation says
https://gcc.gnu.org/onlinedocs/gcc/Structure-Layout-Pragmas.html :
```
that change the maximum alignment of members of structures (other than
zero-width bit-fields), unions, and classes subsequently defined.
```

This does not mean a target is not free to increase the alignment of a global
(or local) variable to begin with. It just means the alignment of a struct is
that so that pointers of that struct will be with the lower alignment.

Targets/GCC could increase alignment of global and local variables even without
worrying about the alignment of the struct.

Reply via email to