Browse Source

Fix for bug report 41460.

 Solve internal error 2008030101 for constant pointer difference in {$T-} mode
Pierre Muller 1 tháng trước cách đây
mục cha
commit
01628263bb
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      compiler/nadd.pas

+ 3 - 1
compiler/nadd.pas

@@ -837,7 +837,9 @@ const
                      { pointer-pointer results in an integer }
                      if (rt=pointerconstn) then
                        begin
-                         if not(anf_has_pointerdiv in addnodeflags) then
+                         if (cs_typed_addresses in current_settings.localswitches) and
+                            (tpointerdef(rd).pointeddef.size>1) and
+                            not(anf_has_pointerdiv in addnodeflags) then
                            internalerror(2008030101);
                          t:=cpointerconstnode.create(qword(v),resultdef)
                        end