avoid double LINs and corrected bug in symbol table entries for records

This commit is contained in:
ceriel 1990-08-22 15:33:43 +00:00
parent ba475d78a2
commit 2a26b4d335
2 changed files with 7 additions and 3 deletions

View file

@ -207,8 +207,8 @@ stb_type(tp, assign_num)
stb_type(sdef->df_type, 0);
adds_db_str(sprint(buf,
",%ld,%ld;",
sdef->df_type->tp_size*8,
sdef->fld_off*8));
sdef->fld_off*8,
sdef->df_type->tp_size*8));
sdef = sdef->df_nextinscope;
}
}

View file

@ -556,7 +556,11 @@ WalkStat(nd, exit_label, end_reached)
if (! end_reached & REACH_FLAG) {
node_warning(nd, W_ORDINARY, "statement not reached");
}
DoLineno(nd);
if (nd->nd_symb != WHILE ||
nd->nd_lineno != left->nd_lineno) {
/* Avoid double linenumber generation in while statements */
DoLineno(nd);
}
options['R'] = (nd->nd_flags & ROPTION);
options['A'] = (nd->nd_flags & AOPTION);
switch(nd->nd_symb) {