Browse Source

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

git-svn-id: trunk@34655 -

nickysn 8 years ago
parent
commit
d6007d650a
1 changed files with 2 additions and 2 deletions
  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
                                              goes wrong when they have to be multiplied with the size of the elements
                                              to which the pointer points in ncginl (mantis #17342) }
                                              to which the pointer points in ncginl (mantis #17342) }
                                            if is_signed(tcallparanode(tcallparanode(left).right).left.resultdef) then
                                            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
                                            else
-                                             inserttypeconv(tcallparanode(tcallparanode(left).right).left,ptruinttype)
+                                             inserttypeconv(tcallparanode(tcallparanode(left).right).left,tpointerdef(tcallparanode(left).left.resultdef).pointer_arithmetic_uint_type)
                                          end
                                          end
                                        else if is_integer(tcallparanode(left).left.resultdef) then
                                        else if is_integer(tcallparanode(left).left.resultdef) then
                                          inserttypeconv(tcallparanode(tcallparanode(left).right).left,tcallparanode(left).left.resultdef)
                                          inserttypeconv(tcallparanode(tcallparanode(left).right).left,tcallparanode(left).left.resultdef)