de-linted somewhat

This commit is contained in:
ceriel 1990-10-02 17:13:40 +00:00
parent 67ef9905e6
commit 4483f237f6
3 changed files with 14 additions and 9 deletions

View file

@ -456,11 +456,6 @@ code_declaration(idf, expr, lvl, sc)
code_scope(idf->id_text, def);
#endif PREPEND_SCOPES
def->df_alloc = ALLOC_DONE;
#ifdef DBSYMTAB
if (options['g']) {
stb_string(def, sc, idf->id_text);
}
#endif /* DBSYMTAB */
C_df_dnam(idf->id_text);
}
}
@ -477,7 +472,7 @@ code_declaration(idf, expr, lvl, sc)
integer label in EM.
*/
#ifdef DBSYMTAB
if (options['g']) {
if (options['g'] && ! expr) {
stb_string(def, sc, idf->id_text);
}
#endif /* DBSYMTAB */

View file

@ -268,6 +268,11 @@ initializer(struct idf *idf; int sc;)
loc_init((struct expr *) 0, idf);
else code_declaration(idf, expr, level, sc);
}
#ifdef DBSYMTAB
if (options['g'] && globalflag) {
stb_string(idf->id_def, sc, idf->id_text);
}
#endif /* DBSYMTAB */
init_idf(idf);
}
;

View file

@ -134,7 +134,7 @@ stb_type(tp, assign_num)
if (tp->tp_size > 0) {
adds_db_str("ar");
stb_type(int_type, 0);
adds_db_str(sprint(buf, ";0;%ld;", tp->tp_size / tp->tp_up->tp_size));
adds_db_str(sprint(buf, ";0;%ld;", tp->tp_size / tp->tp_up->tp_size - 1));
stb_type(tp->tp_up, 0);
}
break;
@ -272,7 +272,7 @@ stb_string(df, kind, str)
else if (df->df_sc != AUTO && df->df_sc != REGISTER) {
/* global */
if (df->df_sc == STATIC) {
if (df->df_level == L_LOCAL) {
if (df->df_level >= L_LOCAL) {
addc_db_str('V');
}
else {
@ -284,7 +284,12 @@ stb_string(df, kind, str)
}
stb_type(tp, 0);
addc_db_str(';');
C_ms_stb_dnam(db_str.base, N_LCSYM, 0, str, (arith) 0);
if (df->df_sc == STATIC && df->df_level >= L_LOCAL) {
C_ms_stb_dlb(db_str.base, N_LCSYM, 0, (label) df->df_address, (arith) 0);
}
else {
C_ms_stb_dnam(db_str.base, N_LCSYM, 0, str, (arith) 0);
}
}
else { /* local variable */
stb_type(tp, 1); /* assign type num to avoid