mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 04:09:33 +02:00
* allow iso gotos within a procedure
git-svn-id: trunk@46396 -
This commit is contained in:
parent
bd6d1e0b6a
commit
61d44bba17
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user