Module Name: src Committed By: rillig Date: Wed Mar 17 01:15:31 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h func.c lex.c lint1.h mem1.c tree.c Log Message: lint: rename 'blklev' to 'block_level' No functional change. To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.143 -r1.144 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.72 -r1.73 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.76 -r1.77 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/lint1/lex.c cvs rdiff -u -r1.70 -r1.71 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.26 -r1.27 src/usr.bin/xlint/lint1/mem1.c cvs rdiff -u -r1.232 -r1.233 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.170 src/usr.bin/xlint/lint1/cgram.y:1.171 --- src/usr.bin/xlint/lint1/cgram.y:1.170 Wed Mar 17 01:07:33 2021 +++ src/usr.bin/xlint/lint1/cgram.y Wed Mar 17 01:15:31 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.170 2021/03/17 01:07:33 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.171 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.170 2021/03/17 01:07:33 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.171 2021/03/17 01:15:31 rillig Exp $"); #endif #include <limits.h> @@ -50,15 +50,15 @@ extern char *yytext; * Contains the level of current declaration, used for symbol table entries. * 0 is the top-level, > 0 is inside a function body. */ -int blklev; +int block_level; /* - * level for memory allocation. Normally the same as blklev. + * level for memory allocation. Normally the same as block_level. * An exception is the declaration of arguments in prototypes. Memory * for these can't be freed after the declaration, but symbols must * be removed from the symbol table after the declaration. */ -int mblklev; +int mem_block_level; /* * Save the no-warns state and restore it to avoid the problem where @@ -423,13 +423,13 @@ function_definition: /* C99 6.9.1 */ YYERROR; } funcdef($1); - blklev++; + block_level++; pushdecl(ARG); if (lwarn == LWARN_NONE) $1->s_used = true; } arg_declaration_list_opt { popdecl(); - blklev--; + block_level--; check_func_lint_directives(); check_func_old_style_arguments(); pushctrl(0); @@ -1048,7 +1048,7 @@ notype_direct_decl: | notype_direct_decl param_list opt_asm_or_symbolrename { $$ = add_function(symbolrename($1, $3), $2); popdecl(); - blklev--; + block_level--; } | notype_direct_decl type_attribute_list ; @@ -1081,7 +1081,7 @@ type_direct_decl: | type_direct_decl param_list opt_asm_or_symbolrename { $$ = add_function(symbolrename($1, $3), $2); popdecl(); - blklev--; + block_level--; } | type_direct_decl type_attribute_list ; @@ -1121,7 +1121,7 @@ direct_param_decl: | direct_param_decl param_list opt_asm_or_symbolrename { $$ = add_function(symbolrename($1, $3), $2); popdecl(); - blklev--; + block_level--; } ; @@ -1150,7 +1150,7 @@ direct_notype_param_decl: | direct_notype_param_decl param_list opt_asm_or_symbolrename { $$ = add_function(symbolrename($1, $3), $2); popdecl(); - blklev--; + block_level--; } ; @@ -1210,7 +1210,7 @@ param_list: id_list_lparen: T_LPAREN { - blklev++; + block_level++; pushdecl(PROTO_ARG); } ; @@ -1242,7 +1242,7 @@ abstract_decl_param_list: abstract_decl_lparen: T_LPAREN { - blklev++; + block_level++; pushdecl(PROTO_ARG); } ; @@ -1459,12 +1459,12 @@ direct_abstract_decl: | abstract_decl_param_list opt_asm_or_symbolrename { $$ = add_function(symbolrename(abstract_name(), $2), $1); popdecl(); - blklev--; + block_level--; } | direct_abstract_decl abstract_decl_param_list opt_asm_or_symbolrename { $$ = add_function(symbolrename($1, $3), $2); popdecl(); - blklev--; + block_level--; } | direct_abstract_decl type_attribute_list ; @@ -1527,8 +1527,8 @@ compound_statement: /* C99 6.8.2 */ compound_statement_lbrace: T_LBRACE { - blklev++; - mblklev++; + block_level++; + mem_block_level++; pushdecl(AUTO); } ; @@ -1537,8 +1537,8 @@ compound_statement_rbrace: T_RBRACE { popdecl(); freeblk(); - mblklev--; - blklev--; + mem_block_level--; + block_level--; ftflg = false; } ; @@ -1677,13 +1677,13 @@ iteration_statement: /* C99 6.8.5 */ CLEAR_WARN_FLAGS(__FILE__, __LINE__); for2(); popdecl(); - blklev--; + block_level--; } | for_exprs error { CLEAR_WARN_FLAGS(__FILE__, __LINE__); for2(); popdecl(); - blklev--; + block_level--; } ; @@ -1709,7 +1709,7 @@ do_while_expr: for_start: T_FOR T_LPAREN { pushdecl(AUTO); - blklev++; + block_level++; } ; for_exprs: @@ -1867,22 +1867,22 @@ term: } | T_LPAREN compound_statement_lbrace declaration_list expr_statement_list { - blklev--; - mblklev--; + block_level--; + mem_block_level--; initsym = mktempsym(duptyp($4->tn_type)); - mblklev++; - blklev++; + mem_block_level++; + block_level++; /* ({ }) is a GCC extension */ gnuism(320); } compound_statement_rbrace T_RPAREN { $$ = new_name_node(initsym, 0); } | T_LPAREN compound_statement_lbrace expr_statement_list { - blklev--; - mblklev--; + block_level--; + mem_block_level--; initsym = mktempsym($3->tn_type); - mblklev++; - blklev++; + mem_block_level++; + block_level++; /* ({ }) is a GCC extension */ gnuism(320); } compound_statement_rbrace T_RPAREN { Index: src/usr.bin/xlint/lint1/decl.c diff -u src/usr.bin/xlint/lint1/decl.c:1.143 src/usr.bin/xlint/lint1/decl.c:1.144 --- src/usr.bin/xlint/lint1/decl.c:1.143 Sun Feb 28 18:51:51 2021 +++ src/usr.bin/xlint/lint1/decl.c Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.143 2021/02/28 18:51:51 rillig Exp $ */ +/* $NetBSD: decl.c,v 1.144 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.143 2021/02/28 18:51:51 rillig Exp $"); +__RCSID("$NetBSD: decl.c,v 1.144 2021/03/17 01:15:31 rillig Exp $"); #endif #include <sys/param.h> @@ -1255,7 +1255,7 @@ bitfield(sym_t *dsym, int len) dsym->s_kind = FMEMBER; dsym->s_scl = MOS; dsym->s_type = gettyp(UINT); - dsym->s_blklev = -1; + dsym->s_block_level = -1; } dsym->s_type = duptyp(dsym->s_type); dsym->s_type->t_bitfield = true; @@ -1606,7 +1606,7 @@ old_style_function_name(sym_t *sym) { if (sym->s_scl != NOSCL) { - if (blklev == sym->s_blklev) { + if (block_level == sym->s_block_level) { /* redeclaration of formal parameter %s */ error(21, sym->s_name); lint_assert(sym->s_defarg); @@ -1669,7 +1669,7 @@ mktag(sym_t *tag, tspec_t kind, bool dec UNIQUE_CURR_POS(tag->s_def_pos); tag->s_kind = FTAG; tag->s_scl = scl; - tag->s_blklev = -1; + tag->s_block_level = -1; tag->s_type = tp = getblk(sizeof (type_t)); tp->t_packed = dcs->d_packed; dcs->d_next->d_nedecl = true; @@ -1700,7 +1700,7 @@ static sym_t * newtag(sym_t *tag, scl_t scl, bool decl, bool semi) { - if (tag->s_blklev < blklev) { + if (tag->s_block_level < block_level) { if (semi) { /* "struct a;" */ if (!tflag) { @@ -1846,7 +1846,7 @@ enumeration_constant(sym_t *sym, int val { if (sym->s_scl != NOSCL) { - if (sym->s_blklev == blklev) { + if (sym->s_block_level == block_level) { /* no hflag, because this is illegal!!! */ if (sym->s_arg) { /* enumeration constant hides parameter: %s */ @@ -1859,7 +1859,7 @@ enumeration_constant(sym_t *sym, int val * complicated to find the position of the * previous declaration */ - if (blklev == 0) + if (block_level == 0) print_previous_declaration(-1, sym); } } else { @@ -2355,7 +2355,8 @@ declare_argument(sym_t *sym, bool initfl check_type(sym); - if (dcs->d_rdcsym != NULL && dcs->d_rdcsym->s_blklev == blklev) { + if (dcs->d_rdcsym != NULL && + dcs->d_rdcsym->s_block_level == block_level) { /* redeclaration of formal parameter %s */ error(237, sym->s_name); rmsym(dcs->d_rdcsym); @@ -2641,7 +2642,7 @@ declare_local(sym_t *dsym, bool initflg) if (dcs->d_rdcsym != NULL) { - if (dcs->d_rdcsym->s_blklev == 0) { + if (dcs->d_rdcsym->s_block_level == 0) { switch (dsym->s_scl) { case AUTO: @@ -2669,7 +2670,7 @@ declare_local(sym_t *dsym, bool initflg) lint_assert(/*CONSTCOND*/false); } - } else if (dcs->d_rdcsym->s_blklev == blklev) { + } else if (dcs->d_rdcsym->s_block_level == block_level) { /* no hflag, because it's illegal! */ if (dcs->d_rdcsym->s_arg) { @@ -2685,7 +2686,7 @@ declare_local(sym_t *dsym, bool initflg) } } - } else if (dcs->d_rdcsym->s_blklev < blklev) { + } else if (dcs->d_rdcsym->s_block_level < block_level) { if (hflag) /* declaration hides earlier one: %s */ @@ -2693,7 +2694,7 @@ declare_local(sym_t *dsym, bool initflg) } - if (dcs->d_rdcsym->s_blklev == blklev) { + if (dcs->d_rdcsym->s_block_level == block_level) { /* redeclaration of %s */ error(27, dsym->s_name); @@ -2731,7 +2732,7 @@ declare_external_in_block(sym_t *dsym) /* look for a symbol with the same name */ esym = dcs->d_rdcsym; - while (esym != NULL && esym->s_blklev != 0) { + while (esym != NULL && esym->s_block_level != 0) { while ((esym = esym->s_link) != NULL) { if (esym->s_kind != FVFT) continue; @@ -2822,7 +2823,7 @@ abstract_name(void) sym->s_name = unnamed; sym->s_def = DEF; sym->s_scl = ABSTRACT; - sym->s_blklev = -1; + sym->s_block_level = -1; if (dcs->d_ctx == PROTO_ARG) sym->s_arg = true; @@ -2845,8 +2846,8 @@ global_clean_up(void) popdecl(); cleanup(); - blklev = 0; - mblklev = 0; + block_level = 0; + mem_block_level = 0; /* * remove all information about pending lint directives without @@ -2964,7 +2965,7 @@ check_usage_sym(bool novar, sym_t *sym) { pos_t cpos; - if (sym->s_blklev == -1) + if (sym->s_block_level == -1) return; cpos = curr_pos; @@ -3006,8 +3007,8 @@ check_variable_usage(bool novar, sym_t * scl_t sc; sym_t *xsym; - lint_assert(blklev != 0); - lint_assert(sym->s_blklev != 0); + lint_assert(block_level != 0); + lint_assert(sym->s_block_level != 0); /* errors in expressions easily cause lots of these warnings */ if (nerr != 0) @@ -3071,8 +3072,8 @@ static void check_label_usage(sym_t *lab) { - lint_assert(blklev == 1); - lint_assert(lab->s_blklev == 1); + lint_assert(block_level == 1); + lint_assert(lab->s_block_level == 1); if (lab->s_set && !lab->s_used) { curr_pos = lab->s_set_pos; @@ -3129,13 +3130,13 @@ check_global_symbols(void) sym_t *sym; pos_t cpos; - if (blklev != 0 || dcs->d_next != NULL) + if (block_level != 0 || dcs->d_next != NULL) norecover(); cpos = curr_pos; for (sym = dcs->d_dlsyms; sym != NULL; sym = sym->s_dlnxt) { - if (sym->s_blklev == -1) + if (sym->s_block_level == -1) continue; if (sym->s_kind == FVFT) { check_global_variable(sym); Index: src/usr.bin/xlint/lint1/externs1.h diff -u src/usr.bin/xlint/lint1/externs1.h:1.72 src/usr.bin/xlint/lint1/externs1.h:1.73 --- src/usr.bin/xlint/lint1/externs1.h:1.72 Sun Feb 28 00:23:55 2021 +++ src/usr.bin/xlint/lint1/externs1.h Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: externs1.h,v 1.72 2021/02/28 00:23:55 rillig Exp $ */ +/* $NetBSD: externs1.h,v 1.73 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -58,8 +58,8 @@ extern void norecover(void); /* * cgram.y */ -extern int blklev; -extern int mblklev; +extern int block_level; +extern int mem_block_level; extern int yydebug; extern int yyerror(const char *); Index: src/usr.bin/xlint/lint1/func.c diff -u src/usr.bin/xlint/lint1/func.c:1.76 src/usr.bin/xlint/lint1/func.c:1.77 --- src/usr.bin/xlint/lint1/func.c:1.76 Wed Mar 10 00:02:00 2021 +++ src/usr.bin/xlint/lint1/func.c Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.76 2021/03/10 00:02:00 rillig Exp $ */ +/* $NetBSD: func.c,v 1.77 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: func.c,v 1.76 2021/03/10 00:02:00 rillig Exp $"); +__RCSID("$NetBSD: func.c,v 1.77 2021/03/17 01:15:31 rillig Exp $"); #endif #include <stdlib.h> @@ -224,8 +224,8 @@ funcdef(sym_t *fsym) * symbol table. */ for (sym = dcs->d_fpsyms; sym != NULL; sym = sym->s_dlnxt) { - if (sym->s_blklev != -1) { - lint_assert(sym->s_blklev == 1); + if (sym->s_block_level != -1) { + lint_assert(sym->s_block_level == 1); inssym(1, sym); } } Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.11 src/usr.bin/xlint/lint1/lex.c:1.12 --- src/usr.bin/xlint/lint1/lex.c:1.11 Mon Mar 1 00:51:01 2021 +++ src/usr.bin/xlint/lint1/lex.c Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.11 2021/03/01 00:51:01 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.12 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: lex.c,v 1.11 2021/03/01 00:51:01 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.12 2021/03/17 01:15:31 rillig Exp $"); #endif #include <ctype.h> @@ -415,7 +415,7 @@ lex_name(const char *yytext, size_t yyle sb->sb_sym = sym; if (sym != NULL) { - lint_assert(blklev >= sym->s_blklev); + lint_assert(block_level >= sym->s_block_level); sb->sb_name = sym->s_name; sb->sb_len = strlen(sym->s_name); tok = sym->s_scl == TYPEDEF ? T_TYPENAME : T_NAME; @@ -1407,7 +1407,7 @@ getsym(sbuf_t *sb) s = getlblk(1, sb->sb_len + 1); (void)memcpy(s, sb->sb_name, sb->sb_len + 1); sym->s_name = s; - sym->s_blklev = 1; + sym->s_block_level = 1; di = dcs; while (di->d_next != NULL && di->d_next->d_next != NULL) di = di->d_next; @@ -1415,7 +1415,7 @@ getsym(sbuf_t *sb) } else { sym = getblk(sizeof (sym_t)); sym->s_name = sb->sb_name; - sym->s_blklev = blklev; + sym->s_block_level = block_level; di = dcs; } @@ -1446,7 +1446,7 @@ mktempsym(type_t *t) { static int n = 0; int h; - char *s = getlblk(blklev, 64); + char *s = getlblk(block_level, 64); sym_t *sym = getblk(sizeof (sym_t)); (void)snprintf(s, 64, "%.8d_tmp", n++); @@ -1454,7 +1454,7 @@ mktempsym(type_t *t) sym->s_name = s; sym->s_type = t; - sym->s_blklev = blklev; + sym->s_block_level = block_level; sym->s_scl = AUTO; sym->s_kind = FVFT; sym->s_used = true; @@ -1472,7 +1472,7 @@ mktempsym(type_t *t) } /* - * Remove a symbol forever from the symbol table. s_blklev + * Remove a symbol forever from the symbol table. s_block_level * is set to -1 to avoid that the symbol will later be put * back to the symbol table. */ @@ -1482,7 +1482,7 @@ rmsym(sym_t *sym) if ((*sym->s_rlink = sym->s_link) != NULL) sym->s_link->s_rlink = sym->s_rlink; - sym->s_blklev = -1; + sym->s_block_level = -1; sym->s_link = NULL; } @@ -1496,7 +1496,7 @@ rmsyms(sym_t *syms) sym_t *sym; for (sym = syms; sym != NULL; sym = sym->s_dlnxt) { - if (sym->s_blklev != -1) { + if (sym->s_block_level != -1) { if ((*sym->s_rlink = sym->s_link) != NULL) sym->s_link->s_rlink = sym->s_rlink; sym->s_link = NULL; @@ -1518,9 +1518,9 @@ inssym(int bl, sym_t *sym) symtab[h]->s_rlink = &sym->s_link; sym->s_rlink = &symtab[h]; symtab[h] = sym; - sym->s_blklev = bl; + sym->s_block_level = bl; lint_assert(sym->s_link == NULL || - sym->s_blklev >= sym->s_link->s_blklev); + sym->s_block_level >= sym->s_link->s_block_level); } /* @@ -1539,14 +1539,14 @@ cleanup(void) for (i = 0; i < HSHSIZ1; i++) { for (sym = symtab[i]; sym != NULL; sym = nsym) { nsym = sym->s_link; - if (sym->s_blklev >= 1) { + if (sym->s_block_level >= 1) { if ((*sym->s_rlink = nsym) != NULL) nsym->s_rlink = sym->s_rlink; } } } - for (i = mblklev; i > 0; i--) + for (i = mem_block_level; i > 0; i--) freelblk(i); } @@ -1561,11 +1561,11 @@ pushdown(sym_t *sym) h = hash(sym->s_name); nsym = getblk(sizeof (sym_t)); - lint_assert(sym->s_blklev <= blklev); + lint_assert(sym->s_block_level <= block_level); nsym->s_name = sym->s_name; UNIQUE_CURR_POS(nsym->s_def_pos); nsym->s_kind = sym->s_kind; - nsym->s_blklev = blklev; + nsym->s_block_level = block_level; if ((nsym->s_link = symtab[h]) != NULL) symtab[h]->s_rlink = &nsym->s_link; Index: src/usr.bin/xlint/lint1/lint1.h diff -u src/usr.bin/xlint/lint1/lint1.h:1.70 src/usr.bin/xlint/lint1/lint1.h:1.71 --- src/usr.bin/xlint/lint1/lint1.h:1.70 Sun Mar 7 18:02:45 2021 +++ src/usr.bin/xlint/lint1/lint1.h Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.70 2021/03/07 18:02:45 rillig Exp $ */ +/* $NetBSD: lint1.h,v 1.71 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -241,7 +241,7 @@ typedef struct sym { to external symbol with same name */ def_t s_def; /* declared, tentative defined, defined */ scl_t s_scl; /* storage class */ - int s_blklev; /* level of declaration, -1 if not in symbol + int s_block_level; /* level of declaration, -1 if not in symbol table */ type_t *s_type; val_t s_value; /* value (if enum or bool constant) */ Index: src/usr.bin/xlint/lint1/mem1.c diff -u src/usr.bin/xlint/lint1/mem1.c:1.26 src/usr.bin/xlint/lint1/mem1.c:1.27 --- src/usr.bin/xlint/lint1/mem1.c:1.26 Sun Feb 21 13:27:22 2021 +++ src/usr.bin/xlint/lint1/mem1.c Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mem1.c,v 1.26 2021/02/21 13:27:22 rillig Exp $ */ +/* $NetBSD: mem1.c,v 1.27 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: mem1.c,v 1.26 2021/02/21 13:27:22 rillig Exp $"); +__RCSID("$NetBSD: mem1.c,v 1.27 2021/03/17 01:15:31 rillig Exp $"); #endif #include <sys/types.h> @@ -167,7 +167,7 @@ getfnid(const char *s) /* * Memory for declarations and other things which must be available * until the end of a block (or the end of the translation unit) - * are associated with the level (mblklev) of the block (or with 0). + * are associated with the level (mem_block_level) of the block (or with 0). * Because this memory is allocated in large blocks associated with * a given level it can be freed easily at the end of a block. */ @@ -182,7 +182,7 @@ typedef struct mbl { } mbl_t; /* - * Array of pointers to lists of memory blocks. mblklev is used as + * Array of pointers to lists of memory blocks. mem_block_level is used as * index into this array. */ static mbl_t **mblks; @@ -306,7 +306,7 @@ void * getblk(size_t s) { - return getlblk(mblklev, s); + return getlblk(mem_block_level, s); } /* Free all memory associated with level l. */ @@ -321,7 +321,7 @@ void freeblk(void) { - freelblk(mblklev); + freelblk(mem_block_level); } static mbl_t *tmblk; Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.232 src/usr.bin/xlint/lint1/tree.c:1.233 --- src/usr.bin/xlint/lint1/tree.c:1.232 Sun Feb 28 22:12:16 2021 +++ src/usr.bin/xlint/lint1/tree.c Wed Mar 17 01:15:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.232 2021/02/28 22:12:16 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.233 2021/03/17 01:15:31 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.232 2021/02/28 22:12:16 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.233 2021/03/17 01:15:31 rillig Exp $"); #endif #include <float.h> @@ -222,7 +222,7 @@ fallback_symbol(sym_t *sym) return; } - if (blklev > 0 && (strcmp(sym->s_name, "__FUNCTION__") == 0 || + if (block_level > 0 && (strcmp(sym->s_name, "__FUNCTION__") == 0 || strcmp(sym->s_name, "__PRETTY_FUNCTION__") == 0)) { /* __FUNCTION__/__PRETTY_FUNCTION__ is a GCC extension */ gnuism(316); @@ -231,7 +231,7 @@ fallback_symbol(sym_t *sym) return; } - if (blklev > 0 && strcmp(sym->s_name, "__func__") == 0) { + if (block_level > 0 && strcmp(sym->s_name, "__func__") == 0) { if (!Sflag) /* __func__ is a C9X feature */ warning(317);