瀏覽代碼

+ also fold nil nodes when used as pointer constants

florian 1 年之前
父節點
當前提交
5c46b5116d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/nadd.pas

+ 2 - 2
compiler/nadd.pas

@@ -687,12 +687,12 @@ implementation
              (allowenumop(nodetype) or (nf_internal in flags))
              (allowenumop(nodetype) or (nf_internal in flags))
             ) or
             ) or
             (
             (
-             (lt = pointerconstn) and
+             (lt in [pointerconstn,niln]) and
              is_constintnode(right) and
              is_constintnode(right) and
              (nodetype in [addn,subn])
              (nodetype in [addn,subn])
             ) or
             ) or
             (
             (
-             (rt = pointerconstn) and
+             (rt in [pointerconstn,niln]) and
              is_constintnode(left) and
              is_constintnode(left) and
              (nodetype=addn)
              (nodetype=addn)
             ) or
             ) or