From 5207aaf391e506a81296653fb47d24e540d2e06f Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 23 Apr 2003 10:12:51 +0000 Subject: [PATCH] * don't check po_varargs for delphi --- compiler/pdecsub.pas | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/compiler/pdecsub.pas b/compiler/pdecsub.pas index 0fe2590274..54c7896b12 100644 --- a/compiler/pdecsub.pas +++ b/compiler/pdecsub.pas @@ -122,7 +122,8 @@ implementation begin if is_open_string(currpara.paratype.def) then Message(parser_w_cdecl_no_openstring); - Message(parser_w_cdecl_has_no_high); + if not (po_external in pd.procoptions) then + Message(parser_w_cdecl_has_no_high); end; end; currpara:=tparaitem(currpara.previous); @@ -1152,7 +1153,7 @@ const pooption : []; mutexclpocall : []; mutexclpotype : [potype_constructor,potype_destructor]; - mutexclpo : [po_assembler,po_external,po_virtualmethod] + mutexclpo : [po_assembler,po_external] ),( idtok:_DYNAMIC; pd_flags : pd_interface+pd_object+pd_notobjintf; @@ -1959,9 +1960,11 @@ const { Check procedure options, Delphi requires that class is repeated in the implementation for class methods } - po_comp:=po_compatibility_options-[po_iocheck,po_staticmethod,po_exports]; - if (m_delphi in aktmodeswitches) then - include(po_comp,po_classmethod); + po_comp:=[]; + if (m_fpc in aktmodeswitches) then + po_comp:=[po_varargs,po_methodpointer,po_containsself,po_interrupt] + else if (m_delphi in aktmodeswitches) then + po_comp:=[po_classmethod,po_methodpointer,po_containsself]; if ((po_comp * hd.procoptions)<>(po_comp * aprocdef.procoptions)) then begin MessagePos1(aprocdef.fileinfo,parser_e_header_dont_match_forward, @@ -2126,7 +2129,10 @@ const end. { $Log$ - Revision 1.112 2003-04-22 13:47:08 peter + Revision 1.113 2003-04-23 10:12:51 peter + * don't check po_varargs for delphi + + Revision 1.112 2003/04/22 13:47:08 peter * fixed C style array of const * fixed C array passing * fixed left to right with high parameters