mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:49:23 +02:00
* inherited forced calling convention
* show hints when forward doesn't match
This commit is contained in:
parent
c56c47fbc0
commit
d582ff8fca
@ -148,12 +148,12 @@ implementation
|
|||||||
strings,
|
strings,
|
||||||
{$endif}
|
{$endif}
|
||||||
globals,verbose,
|
globals,verbose,
|
||||||
symtable,symconst,symtype,symsym,defutil,defcmp,paramgr,
|
symtable,symconst,symtype,symsym,defcmp,paramgr,
|
||||||
{$ifdef GDB}
|
{$ifdef GDB}
|
||||||
gdb,
|
gdb,
|
||||||
{$endif GDB}
|
{$endif GDB}
|
||||||
aasmcpu,
|
aasmcpu,
|
||||||
cpubase,procinfo,cgbase,
|
cpubase,cgbase,
|
||||||
cgobj,rgobj
|
cgobj,rgobj
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -674,6 +674,15 @@ implementation
|
|||||||
if (po_overload in procdefcoll^.data.procoptions) then
|
if (po_overload in procdefcoll^.data.procoptions) then
|
||||||
include(pd.procoptions,po_overload);
|
include(pd.procoptions,po_overload);
|
||||||
|
|
||||||
|
{ inherite calling convention when it was force and the
|
||||||
|
current definition has none force }
|
||||||
|
if (po_hascallingconvention in procdefcoll^.data.procoptions) and
|
||||||
|
not(po_hascallingconvention in pd.procoptions) then
|
||||||
|
begin
|
||||||
|
pd.proccalloption:=procdefcoll^.data.proccalloption;
|
||||||
|
include(pd.procoptions,po_hascallingconvention);
|
||||||
|
end;
|
||||||
|
|
||||||
{ the flags have to match except abstract and override }
|
{ the flags have to match except abstract and override }
|
||||||
{ only if both are virtual !! }
|
{ only if both are virtual !! }
|
||||||
if (procdefcoll^.data.proccalloption<>pd.proccalloption) or
|
if (procdefcoll^.data.proccalloption<>pd.proccalloption) or
|
||||||
@ -681,7 +690,10 @@ implementation
|
|||||||
((procdefcoll^.data.procoptions-
|
((procdefcoll^.data.procoptions-
|
||||||
[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public])<>
|
[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public])<>
|
||||||
(pd.procoptions-[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public])) then
|
(pd.procoptions-[po_abstractmethod,po_overridingmethod,po_assembler,po_overload,po_public])) then
|
||||||
MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,pd.fullprocname(false));
|
begin
|
||||||
|
MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,pd.fullprocname(false));
|
||||||
|
tprocsym(procdefcoll^.data.procsym).write_parameter_lists(pd);
|
||||||
|
end;
|
||||||
|
|
||||||
{ error, if the return types aren't equal }
|
{ error, if the return types aren't equal }
|
||||||
if not(equal_defs(procdefcoll^.data.rettype.def,pd.rettype.def)) and
|
if not(equal_defs(procdefcoll^.data.rettype.def,pd.rettype.def)) and
|
||||||
@ -1344,7 +1356,11 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.49 2003-10-01 20:34:49 peter
|
Revision 1.50 2003-10-07 20:44:22 peter
|
||||||
|
* inherited forced calling convention
|
||||||
|
* show hints when forward doesn't match
|
||||||
|
|
||||||
|
Revision 1.49 2003/10/01 20:34:49 peter
|
||||||
* procinfo unit contains tprocinfo
|
* procinfo unit contains tprocinfo
|
||||||
* cginfo renamed to cgbase
|
* cginfo renamed to cgbase
|
||||||
* moved cgmessage to verbose
|
* moved cgmessage to verbose
|
||||||
|
Loading…
Reference in New Issue
Block a user