From 1486ab7c708eaa3f901a49adc7a2cc42a1081d2c Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 27 Jan 2020 22:27:22 +0000 Subject: [PATCH] * do not throw a warning about unreachable code if the responsible node was generated internally git-svn-id: trunk@44051 - --- compiler/nflw.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/nflw.pas b/compiler/nflw.pas index 981ff799d6..ab5d2dc880 100644 --- a/compiler/nflw.pas +++ b/compiler/nflw.pas @@ -1293,6 +1293,7 @@ implementation if (lnf_testatbegin in loopflags) and (left.nodetype=ordconstn) and (tordconstnode(left).value.uvalue=0) and + not(nf_internal in left.flags) and assigned(right) then CGMessagePos(right.fileinfo,cg_w_unreachable_code); end; @@ -1556,7 +1557,7 @@ implementation else result:=cnothingnode.create; right:=nil; - if warn and assigned(t1) then + if warn and assigned(t1) and not(nf_internal in left.flags) then CGMessagePos(t1.fileinfo,cg_w_unreachable_code); end else @@ -1566,7 +1567,7 @@ implementation else result:=cnothingnode.create; t1:=nil; - if warn and assigned(right) then + if warn and assigned(right) and not(nf_internal in left.flags) then CGMessagePos(right.fileinfo,cg_w_unreachable_code); end; end;