* insert typeconv to ptrint for all inc(pointer) operations

git-svn-id: trunk@144 -
This commit is contained in:
peter 2005-05-29 19:17:31 +00:00
parent 5007b18a23
commit f67de71de2

View File

@ -1770,7 +1770,7 @@ implementation
begin begin
set_varstate(left,vs_used,[vsf_must_be_valid]); set_varstate(left,vs_used,[vsf_must_be_valid]);
result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry)) result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry))
end end
else else
result:=cordconstnode.create(tstringdef(left.resulttype.def).len,u8inttype,true); result:=cordconstnode.create(tstringdef(left.resulttype.def).len,u8inttype,true);
end; end;
@ -2171,11 +2171,12 @@ implementation
CGMessage(parser_e_illegal_expression); CGMessage(parser_e_illegal_expression);
end end
else else
{ no, create constant 1 } begin
if (tcallparanode(left).left.resulttype.def.deftype <> pointerdef) then { no, create constant 1 }
hpp := cordconstnode.create(1,tcallparanode(left).left.resulttype,false) hpp := cordconstnode.create(1,tcallparanode(left).left.resulttype,false);
else end;
hpp := cordconstnode.create(1,ptrinttype,false); 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 } { make sure we don't call functions part of the left node twice (and generally }
{ optimize the code generation) } { optimize the code generation) }
if node_complexity(tcallparanode(left).left) > 1 then if node_complexity(tcallparanode(left).left) > 1 then