Don't erase __attribute__ under clang-cl (#7186)

* Don't erase __attribute__ under clang-cl

The shim fires when __GNUC__ is absent, which clang-cl does not define even
though it supports __attribute__ fully. Erasing it breaks clang's own intrinsics
headers: mmintrin.h declares __m64 as a vector via __attribute__((vector_size)),
so it degrades to a scalar and every use of it fails to compile.

* Don't erase __attribute__ under clang-cl

clang-cl supports it but does not define __GNUC__, so the shim fired and broke
clang's own intrinsics headers.
This commit is contained in:
David Racine
2026-09-13 14:21:36 -04:00
committed by GitHub
parent f00f5b6252
commit 78dc6d9702
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef ATTRIBUTES_H
#define ATTRIBUTES_H
#if !defined(__GNUC__) && !defined(__attribute__)
#if !defined(__GNUC__) && !defined(__clang__) && !defined(__attribute__)
#define __attribute__(x)
#endif