2012-12-20 11:00:39 +00:00
|
|
|
#ifndef NORETURN
|
2012-12-22 17:09:33 +00:00
|
|
|
#define NORETURN [[noreturn]]
|
2012-12-20 11:00:39 +00:00
|
|
|
#endif
|
|
|
|
|
2013-01-30 08:04:56 +00:00
|
|
|
void (...) print = #1;
|
2014-07-31 04:43:08 +00:00
|
|
|
string (float val) ftos = #2;
|
2013-01-30 08:04:56 +00:00
|
|
|
|
2012-12-20 11:00:39 +00:00
|
|
|
NORETURN void error(...) = #6;
|
|
|
|
|
|
|
|
#if TEST == 1
|
|
|
|
void test1(float a) {
|
|
|
|
float x;
|
|
|
|
|
|
|
|
if (a == 1) x = 1337;
|
|
|
|
else if (a == 2) x = 1338;
|
|
|
|
else
|
|
|
|
error("Error\n");
|
|
|
|
print("Is this initialized: ", ftos(x), "\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
float test2(float it) {
|
|
|
|
switch (it) {
|
|
|
|
case 1: return 0;
|
|
|
|
case 2: return 1;
|
|
|
|
default: error("End of non-void not reachable...\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|