port to arm64
[lnanohttp.git] / ulinux / compiler_misc.h
blob780bab55ea9bf955be1de544120b07e633ede747
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
6 */
7 /*----------------------------------------------------------------------------*/
8 #if __GNUC__
9 #define unreachable __builtin_unreachable
10 #define GCC_NOCLONE __attribute__((noclone))
11 #define GCC_NOINLINE __attribute__((noinline))
12 #else
13 #define unreachable()
14 #endif
15 /*----------------------------------------------------------------------------*/
17 /*----------------------------------------------------------------------------*/
18 #if __GNUC__
19 #define PACKED __attribute__((packed))
20 #endif
22 #ifndef PACKED
23 #error "the compiler must support packed structure in some way"
24 #endif
25 /*----------------------------------------------------------------------------*/
26 #endif