ExprDesc desc;
CodeEntry *E;
unsigned char val;
- unsigned I;
NextToken ();
ConsumeRBrack ();
/* Loop over all target labels, specifying this as a jump point.
- ** It's not exact - if there's multiple gotos, the last will be used,
- ** but it's only needed so the optimizer does not remove the labels.
+ ** It's not exact -- if there's multiple gotos, the last will be used;
+ ** but, it's needed only so the optimizer does not remove the labels.
*/
- I = CS_GetEntryCount (CS->Code) - 1;
- E = CS_GetEntry (CS->Code, I);
-
+ E = CS_GetEntry (CS->Code, CS_GetEntryCount (CS->Code) - 1);
tab = GetLabelSymTab ();
if (tab) {
cur = tab->SymHead;
while (cur) {
- if ((cur->Flags & (SC_LABEL|SC_GOTO_IND)) == (SC_LABEL|SC_GOTO_IND)) {
+ if ((cur->Flags & SC_GOTO_IND) != 0) {
cur->V.L.IndJumpFrom = E;
}
cur = cur->NextSym;
}
}
- } else { /* It was not TOK_IDENT, or we couldn't find the symbol */
+ } else {
+ /* It was not TOK_IDENT, or we couldn't find the symbol */
Error ("Array name expected");
}
} else {
-
Error ("Label name expected");
}
}
/* Emit the jump label */
CodeLabel* L = CS_AddLabel (CS->Code, LocalLabelName (Entry->V.L.Label));
+
if (Entry->V.L.IndJumpFrom) {
CollAppend (&L->JumpFrom, Entry->V.L.IndJumpFrom);
}