Hi.
Encountere this issue with the following struct, containing C11 atomics:
typedef struct mqueue {
volatile _Atomic u64 allocated;
volatile _Atomic u64 posted;
volatile _Atomic u64 read;
volatile atomic_ullong freed;
volatile u64 test;
u64 mask, msz;
void *base;
} mqueue;
It appears the type is seen as just volatile, and the size of the type is interpreted as zero, resulting in the entire type being put into a padding field.
Compiled with:
clang version 20.1.7
Target: x86_64-pc-windows-msvc
Thread model: posix