X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCClabel.c;h=ba78d47900ceb109c9715d9eada48410e88a2440;hb=bb226788dab3832b0ec0cda70874ce3fce4eebc6;hp=d31f69d031d453e72303a9024b5c28ea5091dfb7;hpb=55f47f8fb5c237801d250b90f5d067b471656c0c;p=fw%2Fsdcc diff --git a/src/SDCClabel.c b/src/SDCClabel.c index d31f69d0..ba78d479 100644 --- a/src/SDCClabel.c +++ b/src/SDCClabel.c @@ -103,7 +103,7 @@ deleteIfx (iCode * loop, int key) { if (!options.lessPedantic) { - werror (W_CONTROL_FLOW, loop->filename, loop->lineno); + werrorfl (loop->filename, loop->lineno, W_CONTROL_FLOW); } hTabDeleteItem (&labelRef, key, loop, DELETE_ITEM, NULL); @@ -384,7 +384,6 @@ labelUnreach (iCode * ic) /* statement is not a label */ if (loop->op == GOTO || loop->op == RETURN) { - if (loop->next && (loop->next->op == LABEL || loop->next->op == ENDFUNCTION)) @@ -405,12 +404,14 @@ labelUnreach (iCode * ic) hTabDeleteItem (&labelRef, IC_LABEL (tic)->key, tic, DELETE_ITEM, NULL); break; case IFX: + 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: + werrorfl (tic->filename, tic->lineno, W_CODE_UNREACH); } }