Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

-Wpadded does nothing when targeting windows #58100

Copy link
Copy link
Open
@henke96

Description

@henke96
Issue body actions

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

No one assigned

    Labels

    clang:diagnosticsNew/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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.