https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
--- Comment #6 from Andrew Pinski ---
It is not about the alignment of the first field but rather the alignment of a
struct. BUT variable alignment is controlled separately from struct alignment.
That is the point I am trying to make. If you wa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
--- Comment #5 from hanwei (K) ---
You mean the pragma pack just apply to the inner members of struct, not the
first member. The align of struct (first member also) is controlled by
__attribute__((aligned(...))). Right?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|WAITING
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
--- Comment #3 from hanwei (K) ---
Yeap, press return too soon.
Code like:
#include
#pragma pack(1)
char a_global[2] = {0,0};
int g_int[3] = {1, 2, 4};
char b_global[2] = {0, 0};
struct A {
char c;
long long a;
int i;
};
#prag
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
--- Comment #2 from Andrew Pinski ---
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 alignmen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
Andrew Pinski changed:
What|Removed |Added
Component|c |target
Status|UNCONFIRMED