Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: rename ename to enumeration_constant



details:   https://anonhg.NetBSD.org/src/rev/3802afb8762e
branches:  trunk
changeset: 949302:3802afb8762e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 09 13:12:13 2021 +0000

description:
lint: rename ename to enumeration_constant

diffstat:

 usr.bin/xlint/lint1/cgram.y    |  16 ++++++++--------
 usr.bin/xlint/lint1/decl.c     |   6 +++---
 usr.bin/xlint/lint1/externs1.h |   4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

diffs (94 lines):

diff -r 75d8b71a7b1e -r 3802afb8762e usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Jan 09 03:28:47 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Jan 09 13:12:13 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.134 2021/01/09 03:28:47 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.135 2021/01/09 13:12:13 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.134 2021/01/09 03:28:47 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.135 2021/01/09 13:12:13 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -294,7 +294,7 @@
 %type  <y_sym>         enums_with_opt_comma
 %type  <y_sym>         enums
 %type  <y_sym>         enumerator
-%type  <y_sym>         ename
+%type  <y_sym>         enumeration_constant
 %type  <y_sym>         notype_direct_decl
 %type  <y_sym>         type_direct_decl
 %type  <y_pqinf>       pointer
@@ -975,15 +975,15 @@
        ;
 
 enumerator:
-         ename {
-               $$ = ename($1, enumval, 1);
+         enumeration_constant {
+               $$ = enumeration_constant($1, enumval, 1);
          }
-       | ename T_ASSIGN constant {
-               $$ = ename($1, toicon($3, 1), 0);
+       | enumeration_constant T_ASSIGN constant {
+               $$ = enumeration_constant($1, toicon($3, 1), 0);
          }
        ;
 
-ename:
+enumeration_constant:          /* C99 6.4.4.3 */
          identifier {
                $$ = getsym($1);
          }
diff -r 75d8b71a7b1e -r 3802afb8762e usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Sat Jan 09 03:28:47 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Sat Jan 09 13:12:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.111 2021/01/04 22:26:50 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.112 2021/01/09 13:12:13 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.111 2021/01/04 22:26:50 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.112 2021/01/09 13:12:13 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -1822,7 +1822,7 @@
  * impl is 1 if the value of the enumerator was not explicitly specified.
  */
 sym_t *
-ename(sym_t *sym, int val, int impl)
+enumeration_constant(sym_t *sym, int val, int impl)
 {
 
        if (sym->s_scl) {
diff -r 75d8b71a7b1e -r 3802afb8762e usr.bin/xlint/lint1/externs1.h
--- a/usr.bin/xlint/lint1/externs1.h    Sat Jan 09 03:28:47 2021 +0000
+++ b/usr.bin/xlint/lint1/externs1.h    Sat Jan 09 13:12:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: externs1.h,v 1.48 2021/01/03 20:38:26 rillig Exp $     */
+/*     $NetBSD: externs1.h,v 1.49 2021/01/09 13:12:13 rillig Exp $     */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -170,7 +170,7 @@
 extern const   char *storage_class_name(scl_t);
 extern type_t  *complete_tag_struct_or_union(type_t *, sym_t *);
 extern type_t  *complete_tag_enum(type_t *, sym_t *);
-extern sym_t   *ename(sym_t *, int, int);
+extern sym_t   *enumeration_constant(sym_t *, int, int);
 extern void    decl1ext(sym_t *, int);
 extern void    copy_usage_info(sym_t *, sym_t *);
 extern int     check_redeclaration(sym_t *, int *);



Home | Main Index | Thread Index | Old Index