Xen Test Framework
compiler-gcc.h
Go to the documentation of this file.
1#ifndef XTF_COMPILER_GCC_H
2#define XTF_COMPILER_GCC_H
3
4#define GCC_VER (__GNUC__ * 10000 + \
5 __GNUC_MINOR__ * 100 + \
6 __GNUC_PATCHLEVEL__)
7
8/*
9 * The Clang __has_*() infrastructure is a very clean way to identify
10 * compiler support, without resorting to version checks. Fake up
11 * enough support for XTF code to use, even on non-clang compilers.
12 */
13
14#ifndef __has_extension
15
16#define GCC_HAS_c_static_assert (GCC_VER >= 40600) /* _Static_assert() */
17
18#define __has_extension(x) GCC_HAS_ ## x
19#endif /* __has_extension */
20
21#ifdef __GCC_ASM_FLAG_OUTPUTS__
22# define ASM_FLAG_OUT(yes, no) yes
23#else
24# define ASM_FLAG_OUT(yes, no) no
25#endif
26
27#endif /* XTF_COMPILER_GCC_H */
28
29/*
30 * Local variables:
31 * mode: C
32 * c-file-style: "BSD"
33 * c-basic-offset: 4
34 * tab-width: 4
35 * indent-tabs-mode: nil
36 * End:
37 */