| … | … | @@ -253,13 +253,13 @@ static inline char *_strndupa3(char *new_s, const char *s, size_t n) |
| 253 | 253 | * support C11. So it already supports all the features below. */ |
| 254 | 254 | |
| 255 | 255 | /* Optimizations etc. that only gcc understands */ |
| 256 | | /* FIXME: Change to ATTR_* and define also for MSVC. */ |
| 256 | /* FIXME: Define also for MSVC. */ |
| 257 | 257 | #if __GNUC__ |
| 258 | 258 | #define GCC_DIAGNOSTIC |
| 259 | 259 | #define UNREACHABLE(x) (__extension__ ({if (x) __builtin_unreachable();})) |
| 260 | 260 | #define GNUC_MALLOC __attribute__ ((__malloc__)) |
| 261 | 261 | #define GNUC_UNUSED __attribute__ ((__unused__)) |
| 262 | | #define GNUC_NORETURN __attribute__ ((__noreturn__)) |
| 262 | #define NORETURN __attribute__ ((__noreturn__)) |
| 263 | 263 | #define ATTR_PURE __attribute__ ((__pure__)) |
| 264 | 264 | #define NO_SAN __attribute__ ((no_sanitize_address, no_sanitize_undefined)) |
| 265 | 265 | |
| … | … | @@ -271,7 +271,6 @@ static inline char *_strndupa3(char *new_s, const char *s, size_t n) |
| 271 | 271 | #else |
| 272 | 272 | #define NO_SAN_DICT |
| 273 | 273 | #endif |
| 274 | | |
| 275 | 274 | #ifndef DONT_EXPECT |
| 276 | 275 | #define likely(x) __builtin_expect(!!(x), 1) |
| 277 | 276 | #define unlikely(x) __builtin_expect(!!(x), 0) |
| … | … | @@ -281,7 +280,7 @@ static inline char *_strndupa3(char *new_s, const char *s, size_t n) |
| 281 | 280 | #define UNREACHABLE(x) |
| 282 | 281 | #define GNUC_MALLOC |
| 283 | 282 | #define GNUC_UNUSED |
| 284 | | #define GNUC_NORETURN |
| 283 | #define NORETURN |
| 285 | 284 | #define ATTR_PURE |
| 286 | 285 | #define NO_SAN_DICT |
| 287 | 286 | |
| … | … | @@ -289,6 +288,10 @@ static inline char *_strndupa3(char *new_s, const char *s, size_t n) |
| 289 | 288 | #define unlikely(x) x |
| 290 | 289 | #endif |
| 291 | 290 | |
| 291 | #ifdef _MSC_VER |
| 292 | #undef NORETURN |
| 293 | #define NORETURN __declspec(noreturn) |
| 294 | #endif |
| 292 | 295 | |
| 293 | 296 | /* Apply a pragma to a specific code section only. |
| 294 | 297 | * XXX According to the GCC docs, we cannot use here something like |