diff options
author | 2025-08-03 15:29:48 +0100 | |
---|---|---|
committer | 2025-08-03 15:29:48 +0100 | |
commit | b11cf48853bc4eccde60bc82180025f0797fa823 (patch) | |
tree | 7244ab889590066ff2a26ba3c1f475e7dae79130 /src/langext.h | |
parent | 9853d19b4de3e66138da8b3e66ccdaea356ea35b (diff) | |
download | sst-b11cf48853bc4eccde60bc82180025f0797fa823.tar.gz sst-b11cf48853bc4eccde60bc82180025f0797fa823.zip |
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.
Diffstat (limited to 'src/langext.h')
-rw-r--r-- | src/langext.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 |