* don't report name differences after implicit renames

git-svn-id: trunk@2021 -
This commit is contained in:
peter 2005-12-21 11:04:42 +00:00
parent 95879fe8a7
commit ad0f93da39
3 changed files with 20 additions and 14 deletions

View File

@ -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;

View File

@ -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;

View File

@ -1596,6 +1596,7 @@ implementation
begin
inc(dupnr);
dupsym.name:='dup'+tostr(dupnr)+dupsym.name;
include(tsym(dupsym).symoptions,sp_implicitrename);
end;
end;