Skip to content

Suppress "unknown attribute 'no_unique_address' ignored" with MSVC ABI #125184

@bebuch

Description

@bebuch

MSVC introduced [[msvc::no_unique_address]] to workaround ABI break with [[no_unique_address]]. For portability you have to use both.

clang-cl gives me the warning:

unknown attribute 'no_unique_address' ignored [-Wunknown-attributes]

I don't want to suppress warnings for all unknown attributes. But I want to suppress this one, at least if [[msvc::no_unique_address]] is defined as well.

I propose to add a compiler flag to suppress warnings for specific attributes.

I also propose to silently ignore [[no_unique_address]] if [[msvc::no_unique_address]] is defined as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerextension:microsoft

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions