소스 검색

- removed extraneous maybe_begin_aggregate() when a procvar is initialised
with a pointerconstn, and moved the maybe_end_aggregate() for all procvar
initialisation cases to a common location

git-svn-id: trunk@30849 -

Jonas Maebe 10 년 전
부모
커밋
d71f6e9840
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      compiler/ngtcon.pas

+ 1 - 2
compiler/ngtcon.pas

@@ -1386,17 +1386,16 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
                   Message(parser_e_no_procvarnested_const);
                   Message(parser_e_no_procvarnested_const);
                 ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
                 ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
               end;
               end;
-            ftcb.maybe_end_aggregate(def);
           end
           end
         else if n.nodetype=pointerconstn then
         else if n.nodetype=pointerconstn then
           begin
           begin
-            ftcb.maybe_begin_aggregate(def);
             ftcb.emit_tai_procvar2procdef(Tai_const.Create_pint(tpointerconstnode(n).value),def);
             ftcb.emit_tai_procvar2procdef(Tai_const.Create_pint(tpointerconstnode(n).value),def);
             if not def.is_addressonly then
             if not def.is_addressonly then
               ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
               ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
           end
           end
         else
         else
           Message(parser_e_illegal_expression);
           Message(parser_e_illegal_expression);
+        ftcb.maybe_end_aggregate(def);
         n.free;
         n.free;
       end;
       end;