ORCA-C/Tests/Conformance/c11noret.c
Stephen Heumann 6ead1d4caf Add a set of new tests for C95/C99/C11 features that we now support.
These are currently only run by the new DOIT3 test-running script.

Note that these tests are designed to be applicable to most implementations of C95/C99/C11, not just ORCA/C. They do make certain assumptions not guaranteed by the standards (e.g. power of 2 types and some properties of IEEE-like FP), but in general those assumptions should be true for most 'normal' systems.
2021-08-22 17:32:56 -05:00

22 lines
347 B
C

/*
* Test _Noreturn function specifier (C11).
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdnoreturn.h>
noreturn int f2(void) {
printf ("Passed Conformance Test c11noret\n");
exit(0);
}
_Noreturn void f1(void) {
f2();
}
int main(void) {
f1();
printf ("Failed Conformance Test c11noret\n");
}