pike.git/
src/
docode.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-01-15
2001-01-15 18:53:24 by Martin Stjernholm <mast@lysator.liu.se>
e9ebb7fd84e6e27414cf704af91e9f2368e138fe (
7
lines) (+
4
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
Fixed break label association bug.
Rev: src/docode.c:1.98
Rev: src/testsuite.in:1.370
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: docode.c,v 1.
97
2001/01/15
00
:
26
:
51
mast Exp $");
+
RCSID("$Id: docode.c,v 1.
98
2001/01/15
18
:
53
:
24
mast Exp $");
#include "las.h" #include "program.h" #include "pike_types.h"
115:
/* Only cover the current label if it's closed. */ \ new_label__.name = 0; \ new_label__.break_label = new_label__.continue_label = -1; \
+
new_label__.emit_break_label = 0; \
new_label__.cleanups = 0; \ new_label__.stack_depth = current_stack_depth; \ current_label = &new_label__; \
1348:
else { if (n->token == F_BREAK) { for (label = current_label; label; label = label->prev)
-
if (label->break_label >= 0)
+
if (label->break_label >= 0
&& !label->emit_break_label
)
goto label_found_2; yyerror("Break outside loop or switch."); return 0;
1409:
current_label->name = &name; if (!name.next) {
-
current_label->emit_break_label = 0;
+
if (n->token == F_CUSTOM_STMT_LABEL) /* The statement we precede has custom label handling; leave * the statement_label "open" so the statement will use it