* allow iso gotos within a procedure

git-svn-id: trunk@46396 -
This commit is contained in:
florian 2020-08-12 19:07:23 +00:00
parent bd6d1e0b6a
commit 61d44bba17

View File

@ -2179,7 +2179,7 @@ implementation
{ nested exits don't need the non local goto switch }
(labelsym.realname='$nestedexit') then
begin
if current_procinfo.procdef.parast.symtablelevel>labelsym.owner.symtablelevel then
if current_procinfo.procdef.parast.symtablelevel>=labelsym.owner.symtablelevel then
begin
{ don't mess with the exception blocks, global gotos in/out side exception blocks are not allowed }
if exceptionblock>0 then
@ -2212,7 +2212,7 @@ implementation
CGMessage1(cg_e_goto_label_not_found,labelsym.realname);
end
else
CGMessage(cg_e_interprocedural_goto_only_to_outer_scope_allowed);
CGMessagePos(self.fileinfo,cg_e_interprocedural_goto_only_to_outer_scope_allowed);
end
else
CGMessage1(cg_e_goto_label_not_found,labelsym.realname);