X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCClabel.c;h=ba78d47900ceb109c9715d9eada48410e88a2440;hb=810df5aafc13a3251ac2d517d13c1c40ec15b07f;hp=718e75f90fd3f7cb30ab7d57bf7ffb90c3276be4;hpb=b99d2631c97709d691d8dd49d8d4fb9ac2213558;p=fw%2Fsdcc diff --git a/src/SDCClabel.c b/src/SDCClabel.c index 718e75f9..ba78d479 100644 --- a/src/SDCClabel.c +++ b/src/SDCClabel.c @@ -384,8 +384,6 @@ 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 || loop->next->op == ENDFUNCTION)) @@ -406,22 +404,17 @@ labelUnreach (iCode * ic) hTabDeleteItem (&labelRef, IC_LABEL (tic)->key, tic, DELETE_ITEM, NULL); break; case IFX: - warn = 1; + werrorfl (tic->filename, tic->lineno, W_CODE_UNREACH); 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; - + werrorfl (tic->filename, tic->lineno, W_CODE_UNREACH); } } - if (warn) - werrorfl (loop->next->filename, loop->next->lineno, - W_CODE_UNREACH); - /* now set up the pointers */ loop->next = loop2; if (loop2)