aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
Diffstat (limited to 'validation')
-rw-r--r--validation/preprocessor/has-feature.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/validation/preprocessor/has-feature.c b/validation/preprocessor/has-feature.c
new file mode 100644
index 00000000..e0f2e7f6
--- /dev/null
+++ b/validation/preprocessor/has-feature.c
@@ -0,0 +1,20 @@
+#ifndef __has_feature
+__has_feature()??? Quesako?
+#define __has_feature(x) 0
+#else
+"has __has_feature(), yeah!"
+#endif
+
+#if __has_feature(not_a_feature)
+#error "not a feature!"
+#endif
+
+/*
+ * check-name: has-feature
+ * check-command: sparse -E $file
+ *
+ * check-output-start
+
+"has __has_feature(), yeah!"
+ * check-output-end
+ */