소스 검색

* use tpointerdef.pointer_arithmetic_int/uint_type in tinlinenode.pass_typecheck
for handling inc/dec(pointer, int)

git-svn-id: trunk@34655 -

nickysn 9 년 전
부모
커밋
d6007d650a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      compiler/ninl.pas

+ 2 - 2
compiler/ninl.pas

@@ -2926,9 +2926,9 @@ implementation
                                              goes wrong when they have to be multiplied with the size of the elements
                                              to which the pointer points in ncginl (mantis #17342) }
                                            if is_signed(tcallparanode(tcallparanode(left).right).left.resultdef) then
-                                             inserttypeconv(tcallparanode(tcallparanode(left).right).left,ptrsinttype)
+                                             inserttypeconv(tcallparanode(tcallparanode(left).right).left,tpointerdef(tcallparanode(left).left.resultdef).pointer_arithmetic_int_type)
                                            else
-                                             inserttypeconv(tcallparanode(tcallparanode(left).right).left,ptruinttype)
+                                             inserttypeconv(tcallparanode(tcallparanode(left).right).left,tpointerdef(tcallparanode(left).left.resultdef).pointer_arithmetic_uint_type)
                                          end
                                        else if is_integer(tcallparanode(left).left.resultdef) then
                                          inserttypeconv(tcallparanode(tcallparanode(left).right).left,tcallparanode(left).left.resultdef)