mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 22:50:18 +02:00
* don't report name differences after implicit renames
git-svn-id: trunk@2021 -
This commit is contained in:
parent
95879fe8a7
commit
ad0f93da39
@ -938,7 +938,7 @@ implementation
|
||||
single_type(pd.rettype,false);
|
||||
pd.test_if_fpu_result;
|
||||
dec(testcurobject);
|
||||
|
||||
|
||||
if (target_info.system in [system_m68k_amiga]) then
|
||||
begin
|
||||
if (idtoken=_LOCATION) then
|
||||
@ -958,10 +958,10 @@ implementation
|
||||
if po_explicitparaloc in pd.procoptions then
|
||||
{ assign default locationstr, if none specified }
|
||||
{ and we've arguments with explicit paraloc }
|
||||
locationstr:='D0';
|
||||
end;
|
||||
locationstr:='D0';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -2451,15 +2451,19 @@ const
|
||||
if not assigned(ad) or not assigned(fd) then
|
||||
break;
|
||||
{ retrieve names, remove reg for register parameters }
|
||||
s1:=ad.name;
|
||||
s2:=fd.name;
|
||||
{ compare names }
|
||||
if (s1<>s2) then
|
||||
begin
|
||||
MessagePos3(pd.fileinfo,parser_e_header_different_var_names,
|
||||
aprocsym.name,s1,s2);
|
||||
break;
|
||||
end;
|
||||
if not(sp_implicitrename in ad.symoptions) and
|
||||
not(sp_implicitrename in fd.symoptions) then
|
||||
begin
|
||||
s1:=ad.name;
|
||||
s2:=fd.name;
|
||||
{ compare names }
|
||||
if (s1<>s2) then
|
||||
begin
|
||||
MessagePos3(pd.fileinfo,parser_e_header_different_var_names,
|
||||
aprocsym.name,s1,s2);
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
ad:=tsym(ad.indexnext);
|
||||
fd:=tsym(fd.indexnext);
|
||||
until false;
|
||||
|
@ -140,7 +140,8 @@ type
|
||||
sp_has_overloaded,
|
||||
sp_internal, { internal symbol, not reported as unused }
|
||||
sp_strictprivate,
|
||||
sp_strictprotected
|
||||
sp_strictprotected,
|
||||
sp_implicitrename
|
||||
);
|
||||
tsymoptions=set of tsymoption;
|
||||
|
||||
|
@ -1596,6 +1596,7 @@ implementation
|
||||
begin
|
||||
inc(dupnr);
|
||||
dupsym.name:='dup'+tostr(dupnr)+dupsym.name;
|
||||
include(tsym(dupsym).symoptions,sp_implicitrename);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user