ldmud/test/t-language/tl-deadcode2.c
Alexander Motzkau 674e53b595 Added some control flow analysis for better diagnostics
Keep track of the control flow to offer better diagnostics about missing
returns and now about dead code (via the new warn_dead_code pragma).
(Fixes #332)
2022-01-08 22:16:53 +01:00

17 lines
182 B
C

#pragma warn_dead_code
int fun()
{
while (1)
{
break;
return 20;
}
return 30;
}
int run_test()
{
return __MASTER_OBJECT__.warning_occured();
}