Open
Description
test.c:
struct {
long long a;
char b;
} c;
If you compile it with clang -target x86_64-unknown-linux-elf -Wpadded -c test.c
you get the warning test.c:1:1: warning: padding size of 'struct (unnamed at test.c:1:1)' with 7 bytes to alignment boundary [-Wpadded]
as expected.
However, if you target MS abi with clang -target x86_64-unknown-windows-coff -Wpadded -c test.c
there is no warning at all. Note that it happens in real code too, where the struct is actually used. This is just a minimal example.
Metadata
Metadata
Assignees
Labels
New/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer