From f67de71de2d9e94771ec5e8b01d14733019ea67f Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 29 May 2005 19:17:31 +0000 Subject: [PATCH] * insert typeconv to ptrint for all inc(pointer) operations git-svn-id: trunk@144 - --- compiler/ninl.pas | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/compiler/ninl.pas b/compiler/ninl.pas index 2b762367ef..244afa72de 100644 --- a/compiler/ninl.pas +++ b/compiler/ninl.pas @@ -1770,7 +1770,7 @@ implementation begin set_varstate(left,vs_used,[vsf_must_be_valid]); result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry)) - end + end else result:=cordconstnode.create(tstringdef(left.resulttype.def).len,u8inttype,true); end; @@ -2171,11 +2171,12 @@ implementation CGMessage(parser_e_illegal_expression); end else - { no, create constant 1 } - if (tcallparanode(left).left.resulttype.def.deftype <> pointerdef) then - hpp := cordconstnode.create(1,tcallparanode(left).left.resulttype,false) - else - hpp := cordconstnode.create(1,ptrinttype,false); + begin + { no, create constant 1 } + hpp := cordconstnode.create(1,tcallparanode(left).left.resulttype,false); + end; + if (tcallparanode(left).left.resulttype.def.deftype=pointerdef) then + inserttypeconv_internal(hpp,ptrinttype); { make sure we don't call functions part of the left node twice (and generally } { optimize the code generation) } if node_complexity(tcallparanode(left).left) > 1 then