attr_p2_04_aligned_field.c (284B)
1 /* Phase 2: member-level __attribute__((aligned(8))) raises field offset. 2 * Natural layout: a at 0, b at 4 (sizeof int = 4, but aligned(8) forces 8). */ 3 struct S { 4 int a; 5 int b __attribute__((aligned(8))); 6 }; 7 8 int test_main(void) { return (int)__builtin_offsetof(struct S, b); }