[qfcc] Warn about unused labels

This commit is contained in:
Bill Currie 2020-03-11 13:33:06 +09:00
parent 393e540ffa
commit f10f9e157d

View file

@ -1344,7 +1344,11 @@ statement_label (sblock_t *sblock, expr_t *e)
e->e.label.next = sblock->labels;
sblock->labels = &e->e.label;
} else {
debug (e, "dropping unused label %s", e->e.label.name);
if (e->e.label.symbol) {
warning (e, "unused label %s", e->e.label.symbol->name);
} else {
debug (e, "dropping unused label %s", e->e.label.name);
}
}
return sblock;
}