瀏覽代碼

* do not generate var paras for void* if -w is used, resolves #31425

git-svn-id: trunk@35475 -
florian 8 年之前
父節點
當前提交
81c5d63d4e
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 2
      utils/h2pas/h2pas.pas
  2. 4 2
      utils/h2pas/h2pas.y

+ 4 - 2
utils/h2pas/h2pas.pas

@@ -690,8 +690,10 @@ program h2pas;
                    (* is this a good method ??                       *)
                    if varpara and
                       (p^.p1^.p1^.typ=t_pointerdef) and
-                      (p^.p1^.p1^.p1^.typ=t_id) and
-                      (pos('CHAR',uppercase(p^.p1^.p1^.p1^.str))<>0) then
+                      (((p^.p1^.p1^.p1^.typ=t_id) and
+                        (pos('CHAR',uppercase(p^.p1^.p1^.p1^.str))<>0)) or
+                        ((p^.p1^.p1^.p1^.typ=t_void))
+                      ) then
                      varpara:=false;
                    if varpara then
                      begin

+ 4 - 2
utils/h2pas/h2pas.y

@@ -686,8 +686,10 @@ program h2pas;
                    (* is this a good method ??                       *)
                    if varpara and
                       (p^.p1^.p1^.typ=t_pointerdef) and
-                      (p^.p1^.p1^.p1^.typ=t_id) and
-                      (pos('CHAR',uppercase(p^.p1^.p1^.p1^.str))<>0) then
+                      (((p^.p1^.p1^.p1^.typ=t_id) and
+                        (pos('CHAR',uppercase(p^.p1^.p1^.p1^.str))<>0)) or
+                        ((p^.p1^.p1^.p1^.typ=t_void))
+                      ) then
                      varpara:=false;
                    if varpara then
                      begin