typo
[lnanohttp.git] / ulinux / compiler_misc.h
blobd310a995ecb7161255480b95d81ec5c80d9b7cf7
1 #ifndef ULINUX_COMPILER_MISC_H
2 #define ULINUX_COMPILER_MISC_H
3 /******************************************************************************
4 this code is protected by the GNU affero GPLv3
5 author:Sylvain BERTRAND <sylvain.bertrand AT gmail dot com>
6 *******************************************************************************/
7 /*----------------------------------------------------------------------------*/
8 #if __GNUC__
9 #define unreachable __builtin_unreachable
10 #define NOCLONE __attribute__((noclone))
11 #define NOINLINE __attribute__((noinline))
12 #else
13 #define unreachable()
14 /*too risky to have the entry point optimized out with a new C toolchain*/
15 #endif
16 /*----------------------------------------------------------------------------*/
18 /*----------------------------------------------------------------------------*/
19 #if __GNUC__
20 #define PACKED __attribute__((packed))
21 #endif
23 #ifndef PACKED
24 #error "the compiler must support packed structure"
25 #endif
26 /*----------------------------------------------------------------------------*/
27 #endif