Fixed the handling of "while (0) {}".
It's a corner case; but, conditional macroes might create it -- better safe than sorry.
This commit is contained in:
@@ -273,9 +273,6 @@ static void WhileStatement (void)
|
||||
/* Remember the current position */
|
||||
GetCodePos (&CondCodeStart);
|
||||
|
||||
/* Emit the code position label */
|
||||
g_defcodelabel (CondLabel);
|
||||
|
||||
/* Test the loop condition */
|
||||
TestInParens (LoopLabel, 1);
|
||||
|
||||
@@ -288,6 +285,9 @@ static void WhileStatement (void)
|
||||
/* Loop body */
|
||||
Statement (&PendingToken);
|
||||
|
||||
/* Emit the while condition label */
|
||||
g_defcodelabel (CondLabel);
|
||||
|
||||
/* Move the test code here */
|
||||
GetCodePos (&Here);
|
||||
MoveCode (&CondCodeStart, &CondCodeEnd, &Here);
|
||||
|
||||
Reference in New Issue
Block a user