… | |
… | |
47 | # define decltype(x) __decltype(x) |
47 | # define decltype(x) __decltype(x) |
48 | #elif GCC_VERSION(3,0) |
48 | #elif GCC_VERSION(3,0) |
49 | # define decltype(x) typeof(x) |
49 | # define decltype(x) typeof(x) |
50 | #endif |
50 | #endif |
51 | |
51 | |
|
|
52 | #define func_const attribute ((const)) |
|
|
53 | #define func_pure attribute ((pure)) |
|
|
54 | #define func_hot attribute ((hot)) // 4.x |
|
|
55 | #define func_cold attribute ((cold) // 4.x |
|
|
56 | |
52 | #if GCC_VERSION(4,5) |
57 | #if GCC_VERSION(4,5) |
53 | # define unreachable() __builtin_unreachable () |
58 | # define unreachable() __builtin_unreachable () |
54 | #else |
59 | #else |
55 | // this seems to work fine, but gcc always emits a warning for it :/ |
60 | // this seems to work fine, but gcc always emits a warning for it :/ |
56 | static inline void unreachable () attribute ((noreturn)); |
61 | static inline void unreachable () attribute ((noreturn)); |