Skip to content

Spurious clang-cl warnings compiling atomics for ARM64EC #159229

@skoulik

Description

@skoulik

The problem is only reproducible when compiling ARM64EC targets. Using std::atomic_bool::load, std::atomic_signal_fence and others produce warnings: '+cx16' is not a recognized feature for this target (ignoring feature)

Compiling for ARM64, AMD64 does not produce the warnings.

clang-cl --version
clang version 21.1.0
Target: x86_64-pc-windows-msvc
Thread model: posix

test.cpp:
#include <atomic>
int main()
{
std::atomic_signal_fence(std::memory_order_seq_cst);
return 0;
}

test.cpp (another example):
#include <atomic>
int main()
{
std::atomic_bool test {false};
auto t = test.load(std::memory_order_seq_cst);
return 0;
}

clang-cl --target=arm64ec-pc-windows-msvc test.cpp
'+cx16' is not a recognized feature for this target (ignoring feature)
'+cx16' is not a recognized feature for this target (ignoring feature)

clang-cl --target=arm64-pc-windows-msvc test.cpp
(empty output)

clang-cl --target=amd64-pc-windows-msvc test.cpp
(empty output)

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:AArch64clang-cl`clang-cl` driver. Don't use for other compiler partsclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerplatform:windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions