mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 22:10:27 +02:00
* do not set nonlocal for inter-procedural labels, this is not needed, they use
the jmpbuf to reach the target git-svn-id: trunk@46907 -
This commit is contained in:
parent
0904ea0c3f
commit
0bdc1fdea4
@ -2202,7 +2202,6 @@ implementation
|
||||
|
||||
if assigned(labelsym.jumpbuf) then
|
||||
begin
|
||||
labelsym.nonlocal:=true;
|
||||
result:=ccallnode.createintern('fpc_longjmp',
|
||||
ccallparanode.create(cordconstnode.create(1,sinttype,true),
|
||||
ccallparanode.create(cloadnode.create(labelsym.jumpbuf,labelsym.jumpbuf.owner),
|
||||
|
@ -3390,12 +3390,10 @@ implementation
|
||||
Message(sym_e_label_already_defined);
|
||||
if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
|
||||
begin
|
||||
tlabelsym(srsym).nonlocal:=true;
|
||||
include(current_procinfo.flags,pi_has_interproclabel);
|
||||
if (current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
|
||||
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
|
||||
end;
|
||||
if tlabelsym(srsym).nonlocal and
|
||||
(current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
|
||||
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
|
||||
tlabelsym(srsym).defined:=true;
|
||||
p1:=clabelnode.create(nil,tlabelsym(srsym));
|
||||
tlabelsym(srsym).code:=p1;
|
||||
|
@ -1281,12 +1281,10 @@ implementation
|
||||
Message(sym_e_label_already_defined);
|
||||
if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
|
||||
begin
|
||||
tlabelsym(srsym).nonlocal:=true;
|
||||
include(current_procinfo.flags,pi_has_interproclabel);
|
||||
if (current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
|
||||
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
|
||||
end;
|
||||
if tlabelsym(srsym).nonlocal and
|
||||
(current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
|
||||
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
|
||||
|
||||
tlabelsym(srsym).defined:=true;
|
||||
p:=clabelnode.create(nil,tlabelsym(srsym));
|
||||
|
Loading…
Reference in New Issue
Block a user