[Bug target/114955] marco DATA_ALIGNMENT may conflict with pragma pack

2024-05-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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

[Bug target/114955] marco DATA_ALIGNMENT may conflict with pragma pack

2024-05-06 Thread hanwei62 at huawei dot com via Gcc-bugs
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?

[Bug target/114955] marco DATA_ALIGNMENT may conflict with pragma pack

2024-05-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|WAITING

[Bug target/114955] marco DATA_ALIGNMENT may conflict with pragma pack

2024-05-05 Thread hanwei62 at huawei dot com via Gcc-bugs
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

[Bug target/114955] marco DATA_ALIGNMENT may conflict with pragma pack

2024-05-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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

[Bug target/114955] marco DATA_ALIGNMENT may conflict with pragma pack

2024-05-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955 Andrew Pinski changed: What|Removed |Added Component|c |target Status|UNCONFIRMED