mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-02 04:31:25 +00:00
Do not check for functions not returning a value if pc_rev is used.
The pc_rev intermediate code always returns a value, so the check is not needed, and (since the generated code does not jump to a return label) it can yield false positives.
This commit is contained in:
parent
cb6173557e
commit
4d1a8caf8a
11
DAG.pas
11
DAG.pas
@ -5499,7 +5499,7 @@ case code^.opcode of
|
|||||||
pc_bnt, pc_bnl, pc_cnv, pc_dec, pc_inc, pc_ind, pc_lbf, pc_lbu,
|
pc_bnt, pc_bnl, pc_cnv, pc_dec, pc_inc, pc_ind, pc_lbf, pc_lbu,
|
||||||
pc_ngi, pc_ngl, pc_ngr, pc_not, pc_stk, pc_cop, pc_cpo, pc_tl1,
|
pc_ngi, pc_ngl, pc_ngr, pc_not, pc_stk, pc_cop, pc_cpo, pc_tl1,
|
||||||
pc_sro, pc_str, pc_fjp, pc_tjp, pc_xjp, pc_cup, pc_pop, pc_iil,
|
pc_sro, pc_str, pc_fjp, pc_tjp, pc_xjp, pc_cup, pc_pop, pc_iil,
|
||||||
pc_ili, pc_idl, pc_ild, pc_bnq, pc_ngq, pc_rbo:
|
pc_ili, pc_idl, pc_ild, pc_bnq, pc_ngq, pc_rbo, pc_rev:
|
||||||
begin
|
begin
|
||||||
code^.left := Pop;
|
code^.left := Pop;
|
||||||
Push(code);
|
Push(code);
|
||||||
@ -5534,15 +5534,6 @@ case code^.opcode of
|
|||||||
Push(code);
|
Push(code);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
pc_rev:
|
|
||||||
begin
|
|
||||||
code^.left := Pop;
|
|
||||||
if (lint & lintReturn) <> 0 then
|
|
||||||
if fIsNoreturn or ((code^.optype <> cgVoid) and not doingMain) then
|
|
||||||
CheckReturn;
|
|
||||||
Push(code);
|
|
||||||
end;
|
|
||||||
|
|
||||||
pc_cnn:
|
pc_cnn:
|
||||||
begin
|
begin
|
||||||
code^.opcode := pc_cnv;
|
code^.opcode := pc_cnv;
|
||||||
|
Loading…
Reference in New Issue
Block a user