Module Name:    src
Committed By:   rillig
Date:           Sat Jan  9 13:12:13 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h

Log Message:
lint: rename ename to enumeration_constant


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.111 -r1.112 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/xlint/lint1/externs1.h

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.134 src/usr.bin/xlint/lint1/cgram.y:1.135
--- src/usr.bin/xlint/lint1/cgram.y:1.134	Sat Jan  9 03:28:47 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Jan  9 13:12:13 2021
@@ -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 @@ anonymize(sym_t *s)
 %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 @@ enums:
 	;
 
 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);
 	  }

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.111 src/usr.bin/xlint/lint1/decl.c:1.112
--- src/usr.bin/xlint/lint1/decl.c:1.111	Mon Jan  4 22:26:50 2021
+++ src/usr.bin/xlint/lint1/decl.c	Sat Jan  9 13:12:13 2021
@@ -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 @@ complete_tag_enum(type_t *tp, sym_t *fme
  * 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) {

Index: src/usr.bin/xlint/lint1/externs1.h
diff -u src/usr.bin/xlint/lint1/externs1.h:1.48 src/usr.bin/xlint/lint1/externs1.h:1.49
--- src/usr.bin/xlint/lint1/externs1.h:1.48	Sun Jan  3 20:38:26 2021
+++ src/usr.bin/xlint/lint1/externs1.h	Sat Jan  9 13:12:13 2021
@@ -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	type_t	*mktag(sym_t *, tspec_t, i
 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 *);

Reply via email to