kernel-printf: add printf format %pra for struct range
[smatch.git] / validation / preprocessor / has-attribute.c
blob3149cbfa6338ce730c03a80b9782786bf5c8bb96
1 #ifndef __has_attribute
2 __has_attribute()??? Quesako?
3 #define __has_attribute(x) 0
4 #else
5 "has __has_attribute(), yeah!"
6 #endif
8 123 __has_attribute(nothinx) def
10 #if __has_attribute(nothinx)
11 #error "not a attribute!"
12 #endif
14 #if 1 \
15 && __has_attribute(packed) \
16 && __has_attribute(aligned) \
17 && __has_attribute(const) \
18 && __has_attribute(pure) \
19 && __has_attribute(noreturn) \
20 && __has_attribute(designated_init) \
21 && __has_attribute(transparent_union) \
23 "ok gcc"
24 #endif
26 #if 1 \
27 && __has_attribute(fastcall) \
29 "ok gcc ignore"
30 #endif
32 #if 1 \
33 && __has_attribute(nocast) \
34 && __has_attribute(noderef) \
35 && __has_attribute(safe) \
36 && __has_attribute(force) \
37 && __has_attribute(bitwise) \
38 && __has_attribute(address_space) \
39 && __has_attribute(context) \
41 "ok sparse specific"
42 #endif
45 * check-name: has-attribute
46 * check-command: sparse -E $file
48 * check-output-start
50 "has __has_attribute(), yeah!"
51 123 0 def
52 "ok gcc"
53 "ok gcc ignore"
54 "ok sparse specific"
55 * check-output-end