From 190ea14bbf97341d525efcc54b6904057b01fd73 Mon Sep 17 00:00:00 2001 From: dick Date: Thu, 3 Nov 1988 13:20:27 +0000 Subject: [PATCH] lint: retrieving string arguments from str_list --- lang/cem/cemcom/arith.c | 2 -- lang/cem/cemcom/code.c | 4 +--- lang/cem/cemcom/code.str | 2 ++ lang/cem/cemcom/ival.g | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lang/cem/cemcom/arith.c b/lang/cem/cemcom/arith.c index fa02fd432..5632e84e4 100644 --- a/lang/cem/cemcom/arith.c +++ b/lang/cem/cemcom/arith.c @@ -339,7 +339,6 @@ function2pointer(exp) string2pointer(ex) register struct expr *ex; { -#ifndef LINT /* The expression, which must be a string constant, is converted to a pointer to the string-containing area. */ @@ -350,7 +349,6 @@ string2pointer(ex) ex->VL_CLASS = Label; ex->VL_LBL = lbl; ex->VL_VALUE = (arith)0; -#endif LINT } opnd2integral(expp, oper) diff --git a/lang/cem/cemcom/code.c b/lang/cem/cemcom/code.c index 6a9b9f448..3bcd510f2 100644 --- a/lang/cem/cemcom/code.c +++ b/lang/cem/cemcom/code.c @@ -72,9 +72,8 @@ init_code(dst_file) } #endif LINT -static struct string_cst *str_list = 0; +struct string_cst *str_list = 0; -#ifndef LINT code_string(val, len, dlb) char *val; int len; @@ -89,7 +88,6 @@ code_string(val, len, dlb) sc->sc_len = len; sc->sc_dlb = dlb; } -#endif LINT def_strings(sc) register struct string_cst *sc; diff --git a/lang/cem/cemcom/code.str b/lang/cem/cemcom/code.str index f96b6e462..6fa088c95 100644 --- a/lang/cem/cemcom/code.str +++ b/lang/cem/cemcom/code.str @@ -12,6 +12,8 @@ struct string_cst { /* storing string constants */ label sc_dlb; }; +extern struct string_cst *str_list; + /* ALLOCDEF "string_cst" 10 */ #define LVAL 0 diff --git a/lang/cem/cemcom/ival.g b/lang/cem/cemcom/ival.g index 93ce43446..3af7f1488 100644 --- a/lang/cem/cemcom/ival.g +++ b/lang/cem/cemcom/ival.g @@ -489,12 +489,10 @@ check_ival(expp, tp) else /* e.g., int a; int *p = &a; */ C_con_dnam(idf->id_text, expr->VL_VALUE); } -#ifndef LINT else { ASSERT(expr->VL_CLASS == Label); C_con_dlb(expr->VL_LBL, expr->VL_VALUE); } -#endif LINT break; #ifndef NOFLOAT case FLOAT: -- 2.34.1