mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-30 14:31:04 +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_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_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
|
||||
code^.left := Pop;
|
||||
Push(code);
|
||||
@ -5534,15 +5534,6 @@ case code^.opcode of
|
||||
Push(code);
|
||||
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:
|
||||
begin
|
||||
code^.opcode := pc_cnv;
|
||||
|
Loading…
Reference in New Issue
Block a user