Przeglądaj źródła

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

git-svn-id: trunk@34655 -

nickysn 9 lat temu
rodzic
commit
d6007d650a
1 zmienionych plików z 2 dodań i 2 usunięć
  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)