mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 23:29:13 +02:00
* do not throw a warning about unreachable code if the responsible node was generated internally
git-svn-id: trunk@44051 -
This commit is contained in:
parent
405b01f116
commit
1486ab7c70
@ -1293,6 +1293,7 @@ implementation
|
|||||||
if (lnf_testatbegin in loopflags) and
|
if (lnf_testatbegin in loopflags) and
|
||||||
(left.nodetype=ordconstn) and
|
(left.nodetype=ordconstn) and
|
||||||
(tordconstnode(left).value.uvalue=0) and
|
(tordconstnode(left).value.uvalue=0) and
|
||||||
|
not(nf_internal in left.flags) and
|
||||||
assigned(right) then
|
assigned(right) then
|
||||||
CGMessagePos(right.fileinfo,cg_w_unreachable_code);
|
CGMessagePos(right.fileinfo,cg_w_unreachable_code);
|
||||||
end;
|
end;
|
||||||
@ -1556,7 +1557,7 @@ implementation
|
|||||||
else
|
else
|
||||||
result:=cnothingnode.create;
|
result:=cnothingnode.create;
|
||||||
right:=nil;
|
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);
|
CGMessagePos(t1.fileinfo,cg_w_unreachable_code);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1566,7 +1567,7 @@ implementation
|
|||||||
else
|
else
|
||||||
result:=cnothingnode.create;
|
result:=cnothingnode.create;
|
||||||
t1:=nil;
|
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);
|
CGMessagePos(right.fileinfo,cg_w_unreachable_code);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user