Files
Shipwright/soh/include/attributes.h
T
David Racine 78dc6d9702 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.
2026-09-13 18:21:36 +00:00

13 lines
296 B
C

#ifndef ATTRIBUTES_H
#define ATTRIBUTES_H
#if !defined(__GNUC__) && !defined(__clang__) && !defined(__attribute__)
#define __attribute__(x)
#endif
#define UNUSED __attribute__((unused))
#define FALLTHROUGH __attribute__((fallthrough))
#define NORETURN __attribute__((noreturn))
#endif