Browse Source

* varargs is not checked in proc->procvar for delphi

peter 23 năm trước cách đây
mục cha
commit
50e870348b
1 tập tin đã thay đổi với 8 bổ sung3 xóa
  1. 8 3
      compiler/defcmp.pas

+ 8 - 3
compiler/defcmp.pas

@@ -1138,11 +1138,10 @@ implementation
 
 
 
 
     function proc_to_procvar_equal(def1:tabstractprocdef;def2:tprocvardef):tequaltype;
     function proc_to_procvar_equal(def1:tabstractprocdef;def2:tprocvardef):tequaltype;
-      const
-        po_comp = po_compatibility_options-[po_methodpointer];
       var
       var
         ismethod : boolean;
         ismethod : boolean;
         eq : tequaltype;
         eq : tequaltype;
+        po_comp : tprocoptions;
       begin
       begin
          proc_to_procvar_equal:=te_incompatible;
          proc_to_procvar_equal:=te_incompatible;
          if not(assigned(def1)) or not(assigned(def2)) then
          if not(assigned(def1)) or not(assigned(def2)) then
@@ -1164,6 +1163,9 @@ implementation
             exit;
             exit;
           end;
           end;
          { check return value and options, methodpointer is already checked }
          { check return value and options, methodpointer is already checked }
+         po_comp:=po_compatibility_options-[po_methodpointer];
+         if (m_delphi in aktmodeswitches) then
+           exclude(po_comp,po_varargs);
          if ((po_comp * def1.procoptions)= (po_comp * def2.procoptions)) and
          if ((po_comp * def1.procoptions)= (po_comp * def2.procoptions)) and
             equal_defs(def1.rettype.def,def2.rettype.def) and
             equal_defs(def1.rettype.def,def2.rettype.def) and
             (def1.para_size(target_info.alignment.paraalign)=def2.para_size(target_info.alignment.paraalign)) then
             (def1.para_size(target_info.alignment.paraalign)=def2.para_size(target_info.alignment.paraalign)) then
@@ -1196,7 +1198,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  2002-12-29 14:57:50  peter
+  Revision 1.13  2002-12-29 18:15:19  peter
+    * varargs is not checked in proc->procvar for delphi
+
+  Revision 1.12  2002/12/29 14:57:50  peter
     * unit loading changed to first register units and load them
     * unit loading changed to first register units and load them
       afterwards. This is needed to support uses xxx in yyy correctly
       afterwards. This is needed to support uses xxx in yyy correctly
     * unit dependency check fixed
     * unit dependency check fixed