From 6d9ef3245dfc8cbcc2e1d3f28e05090f1ed766a8 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 1 Mar 2019 21:49:01 -0500 Subject: skeletons for C11/C18 functions --- stdnoreturn.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 stdnoreturn.c (limited to 'stdnoreturn.c') 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 +#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 -- cgit v1.2.1