summaryrefslogtreecommitdiff
path: root/stdnoreturn.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdnoreturn.c')
-rw-r--r--stdnoreturn.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/stdnoreturn.c b/stdnoreturn.c
new file mode 100644
index 0000000..1b73017
--- /dev/null
+++ b/stdnoreturn.c
@@ -0,0 +1,23 @@
+#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__
+#include <stdnoreturn.h>
+#include "test.h"
+
+noreturn void foo(void)
+{
+ for (;;);
+}
+
+void test_stdnoreturn_h(void)
+{
+ testing_header(".h");
+
+ /* tested by the fact that this compiles */
+
+ testing_end();
+}
+
+#else
+void test_stdnoreturn_h(void)
+{
+}
+#endif