avoid double LINs and corrected bug in symbol table entries for records
authorceriel <none@none>
Wed, 22 Aug 1990 15:33:43 +0000 (15:33 +0000)
committerceriel <none@none>
Wed, 22 Aug 1990 15:33:43 +0000 (15:33 +0000)
lang/m2/comp/stab.c
lang/m2/comp/walk.c

index 657a8f6..deca994 100644 (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;
                        }
                }
index 52fda8a..8eb4c97 100644 (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) {