Skip to content
Snippets Groups Projects
Commit bb9b94ed authored by Paul Russo's avatar Paul Russo
Browse files

After handling a break or continue statement while

executing a loop, reset the parser return code so
that we do not propagate the break/continue status
upward.

This problem was only visible under -O1, -O2, and
-O3, the defective code was not executed under -O0
or -O4.

This fixes Savannah bug #35884: Problem with break. 

This is the same fix as revision 23561, but for cint7
instead of cint5.

-- Paul Russo


git-svn-id: http://root.cern.ch/svn/root/trunk@23562 27541ba8-7e3a-0410-8455-c3a389f83636
parent 20614902
No related branches found
No related tags found
No related merge requests found
......@@ -3042,6 +3042,8 @@ static G__value G__exec_loop(char *forinit,char *condition,int naction,char **fo
}
// The body did a break, and we are generating bytecode.
executed_break = 1;
// We do not propagate the break status upwards.
result = G__null;
if (isblock) {
// -- Parse the rest of the body, generating code.
//fprintf(stderr, "G__exec_loop: Body did a break, generating code for rest of body block.\n");
......@@ -3057,6 +3059,8 @@ static G__value G__exec_loop(char *forinit,char *condition,int naction,char **fo
// -- The body did a continue.
//fprintf(stderr, "G__exec_loop: The body did a continue.\n");
executed_continue = 1;
// We do not propagate the continue status.
result = G__null;
if (G__asm_noverflow) {
// -- We are generating bytecode.
if (isblock) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment