Browse Source

* Allow constant uint64 operations for +,-,shl,shr,or,xor,and.

git-svn-id: branches/fixes_2_2@7681 -
daniel 18 năm trước cách đây
mục cha
commit
2a96f150c4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      compiler/nadd.pas

+ 2 - 2
compiler/nadd.pas

@@ -221,8 +221,8 @@ implementation
         { both are int constants }
         if (
             (
-             is_constintnode(left) and (Torddef(ld).ordtype<>u64bit) and
-             is_constintnode(right) and (Torddef(rd).ordtype<>u64bit)
+             is_constintnode(left) and ((Torddef(rd).ordtype<>u64bit) or (nodetype in [addn,subn,shln,shrn,andn,orn,xorn])) and
+             is_constintnode(right) and ((Torddef(rd).ordtype<>u64bit) or (nodetype in [addn,subn,shln,shrn,andn,orn,xorn]))
             ) or
             (
              is_constboolnode(left) and