From b11cf48853bc4eccde60bc82180025f0797fa823 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 3 Aug 2025 15:29:48 +0100 Subject: Use shorter spellings of __asm and __attribute Turns out, there's no need for the trailing underscores. Plus, glibc does some stupid stuff with __attribute__ for non-GCC compilers. Not that that matters here, but it seems like a good practice just to use the forms that never have such problems. And it's shorter too. --- src/langext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/langext.h') diff --git a/src/langext.h b/src/langext.h index de96ef5..d2d9a23 100644 --- a/src/langext.h +++ b/src/langext.h @@ -16,7 +16,7 @@ #define if_random(x) if (__builtin_expect_with_probability(!!(x), 1, 0.5)) #define unreachable __builtin_unreachable() #define assume(x) ((void)(!!(x) || (unreachable, 0))) -#define cold __attribute__((__cold__, __noinline__)) +#define cold __attribute((__cold__, __noinline__)) #else #define if_hot(x) if (x) #define if_cold(x) if (x) @@ -57,7 +57,7 @@ static inline _Noreturn void _invoke_ub() {} #define import #ifdef __GNUC__ // N.B. we assume -fvisibility=hidden -#define export __attribute__((visibility("default")) +#define export __attribute((visibility("default")) #else #define export int exp[-!!"compiler needs a way to export symbols!"]; #endif -- cgit v1.2.3-54-g00ecf