mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 11:18:36 +02:00
* moved the initialization of the resultdef for labelsyms in the typecheckpass
of taddrnode to a virtual method taddrnode.set_labelsym_resultdef. No functional changes. git-svn-id: trunk@38676 -
This commit is contained in:
parent
c46cbc8411
commit
109fb279f6
@ -94,6 +94,7 @@ interface
|
|||||||
function simplify(forinline : boolean) : tnode; override;
|
function simplify(forinline : boolean) : tnode; override;
|
||||||
protected
|
protected
|
||||||
mark_read_written: boolean;
|
mark_read_written: boolean;
|
||||||
|
procedure set_labelsym_resultdef; virtual;
|
||||||
function typecheck_non_proc(realsource: tnode; out res: tnode): boolean; virtual;
|
function typecheck_non_proc(realsource: tnode; out res: tnode): boolean; virtual;
|
||||||
end;
|
end;
|
||||||
taddrnodeclass = class of taddrnode;
|
taddrnodeclass = class of taddrnode;
|
||||||
@ -646,6 +647,12 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure taddrnode.set_labelsym_resultdef;
|
||||||
|
begin
|
||||||
|
resultdef:=voidcodepointertype;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function taddrnode.typecheck_non_proc(realsource: tnode; out res: tnode): boolean;
|
function taddrnode.typecheck_non_proc(realsource: tnode; out res: tnode): boolean;
|
||||||
var
|
var
|
||||||
hp : tnode;
|
hp : tnode;
|
||||||
@ -657,7 +664,7 @@ implementation
|
|||||||
if (realsource.nodetype=loadn) and
|
if (realsource.nodetype=loadn) and
|
||||||
(tloadnode(realsource).symtableentry.typ=labelsym) then
|
(tloadnode(realsource).symtableentry.typ=labelsym) then
|
||||||
begin
|
begin
|
||||||
resultdef:=voidcodepointertype;
|
set_labelsym_resultdef;
|
||||||
result:=true;
|
result:=true;
|
||||||
end
|
end
|
||||||
else if (realsource.nodetype=loadn) and
|
else if (realsource.nodetype=loadn) and
|
||||||
|
Loading…
Reference in New Issue
Block a user