mirror of
https://github.com/ldmud/ldmud
synced 2026-08-12 14:26:05 -04:00
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)
17 lines
182 B
C
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();
|
|
}
|