summaryrefslogtreecommitdiff
path: root/stdnoreturn.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-01 21:49:01 -0500
committerJakob Kaivo <jkk@ung.org>2019-03-01 21:49:01 -0500
commit6d9ef3245dfc8cbcc2e1d3f28e05090f1ed766a8 (patch)
tree3676d601081ce2b43224c9c2d0bb3d2d5825ef3f /stdnoreturn.c
parent306613c5a17842fc6967f9a9a3722a63767c3b75 (diff)
skeletons for C11/C18 functions
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