X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCClabel.c;h=718e75f90fd3f7cb30ab7d57bf7ffb90c3276be4;hb=5bc044cc26d5c7120689edffd312cb2774fc1c29;hp=de023c83af72b365183a238cba640e4a9d2fbdd4;hpb=5a3b73dade31d4473db40324a3cda9a8d5ed1bb0;p=fw%2Fsdcc diff --git a/src/SDCClabel.c b/src/SDCClabel.c index de023c83..718e75f9 100644 --- a/src/SDCClabel.c +++ b/src/SDCClabel.c @@ -384,6 +384,7 @@ labelUnreach (iCode * ic) /* statement is not a label */ if (loop->op == GOTO || loop->op == RETURN) { + int warn = 0; if (loop->next && (loop->next->op == LABEL || @@ -405,15 +406,22 @@ labelUnreach (iCode * ic) hTabDeleteItem (&labelRef, IC_LABEL (tic)->key, tic, DELETE_ITEM, NULL); break; case IFX: + warn = 1; if (IC_TRUE (tic)) hTabDeleteItem (&labelRef, IC_TRUE (tic)->key, tic, DELETE_ITEM, NULL); else hTabDeleteItem (&labelRef, IC_FALSE (tic)->key, tic, DELETE_ITEM, NULL); break; + default: + warn = 1; } } + if (warn) + werrorfl (loop->next->filename, loop->next->lineno, + W_CODE_UNREACH); + /* now set up the pointers */ loop->next = loop2; if (loop2)