1f08c3bdfSopenharmony_ci#ifndef __has_attribute
2f08c3bdfSopenharmony_ci__has_attribute()??? Quesako?
3f08c3bdfSopenharmony_ci#define __has_attribute(x) 0
4f08c3bdfSopenharmony_ci#else
5f08c3bdfSopenharmony_ci"has __has_attribute(), yeah!"
6f08c3bdfSopenharmony_ci#endif
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ci123 __has_attribute(nothinx) def
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_ci#if __has_attribute(nothinx)
11f08c3bdfSopenharmony_ci#error "not a attribute!"
12f08c3bdfSopenharmony_ci#endif
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ci#if 1					\
15f08c3bdfSopenharmony_ci && __has_attribute(packed)		\
16f08c3bdfSopenharmony_ci && __has_attribute(aligned)		\
17f08c3bdfSopenharmony_ci && __has_attribute(const)		\
18f08c3bdfSopenharmony_ci && __has_attribute(pure)		\
19f08c3bdfSopenharmony_ci && __has_attribute(noreturn)		\
20f08c3bdfSopenharmony_ci && __has_attribute(designated_init)	\
21f08c3bdfSopenharmony_ci && __has_attribute(transparent_union)	\
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci"ok gcc"
24f08c3bdfSopenharmony_ci#endif
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci#if 1					\
27f08c3bdfSopenharmony_ci && __has_attribute(fastcall)		\
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci"ok gcc ignore"
30f08c3bdfSopenharmony_ci#endif
31f08c3bdfSopenharmony_ci
32f08c3bdfSopenharmony_ci#if 1					\
33f08c3bdfSopenharmony_ci && __has_attribute(nocast)		\
34f08c3bdfSopenharmony_ci && __has_attribute(noderef)		\
35f08c3bdfSopenharmony_ci && __has_attribute(safe)		\
36f08c3bdfSopenharmony_ci && __has_attribute(force)		\
37f08c3bdfSopenharmony_ci && __has_attribute(bitwise)		\
38f08c3bdfSopenharmony_ci && __has_attribute(address_space)	\
39f08c3bdfSopenharmony_ci && __has_attribute(context)		\
40f08c3bdfSopenharmony_ci
41f08c3bdfSopenharmony_ci"ok sparse specific"
42f08c3bdfSopenharmony_ci#endif
43f08c3bdfSopenharmony_ci
44f08c3bdfSopenharmony_ci/*
45f08c3bdfSopenharmony_ci * check-name: has-attribute
46f08c3bdfSopenharmony_ci * check-command: sparse -E $file
47f08c3bdfSopenharmony_ci *
48f08c3bdfSopenharmony_ci * check-output-start
49f08c3bdfSopenharmony_ci
50f08c3bdfSopenharmony_ci"has __has_attribute(), yeah!"
51f08c3bdfSopenharmony_ci123 0 def
52f08c3bdfSopenharmony_ci"ok gcc"
53f08c3bdfSopenharmony_ci"ok gcc ignore"
54f08c3bdfSopenharmony_ci"ok sparse specific"
55f08c3bdfSopenharmony_ci * check-output-end
56f08c3bdfSopenharmony_ci */
57