From 109fb279f6d0f671cf5b7c6c9ac429778339c738 Mon Sep 17 00:00:00 2001 From: nickysn Date: Wed, 4 Apr 2018 12:09:15 +0000 Subject: [PATCH] * 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 - --- compiler/nmem.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/nmem.pas b/compiler/nmem.pas index 83f0a0348c..f0c8301b4c 100644 --- a/compiler/nmem.pas +++ b/compiler/nmem.pas @@ -94,6 +94,7 @@ interface function simplify(forinline : boolean) : tnode; override; protected mark_read_written: boolean; + procedure set_labelsym_resultdef; virtual; function typecheck_non_proc(realsource: tnode; out res: tnode): boolean; virtual; end; taddrnodeclass = class of taddrnode; @@ -646,6 +647,12 @@ implementation end; + procedure taddrnode.set_labelsym_resultdef; + begin + resultdef:=voidcodepointertype; + end; + + function taddrnode.typecheck_non_proc(realsource: tnode; out res: tnode): boolean; var hp : tnode; @@ -657,7 +664,7 @@ implementation if (realsource.nodetype=loadn) and (tloadnode(realsource).symtableentry.typ=labelsym) then begin - resultdef:=voidcodepointertype; + set_labelsym_resultdef; result:=true; end else if (realsource.nodetype=loadn) and