1#ifndef __has_builtin
2__has_builtin()??? Quesako?
3#define __has_builtin(x) 0
4#else
5"has __has_builtin(), yeah!"
6#endif
7
8#if __has_builtin(nothing)
9#error "not a builtin!"
10#endif
11
12#if __has_builtin(__builtin_offsetof)		\
13 || __has_builtin(__builtin_types_compatible_p)
14#error "builtin ops are not builtin functions!"
15#endif
16
17#if __has_builtin(__builtin_va_list)		\
18 || __has_builtin(__builtin_ms_va_list)
19#error "builtin types are not builtin functions!"
20#endif
21
22#if __has_builtin(__builtin_abs)
23abs
24#endif
25
26#if __has_builtin(__builtin_constant_p)
27constant_p
28#endif
29
30123 __has_builtin(abc) def
31
32/*
33 * check-name: has-builtin
34 * check-command: sparse -E $file
35 *
36 * check-output-start
37
38"has __has_builtin(), yeah!"
39abs
40constant_p
41123 0 def
42 * check-output-end
43 */
44