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 grammar rules for specifier...
details: https://anonhg.NetBSD.org/src/rev/1dadcfe88bbf
branches: trunk
changeset: 984758:1dadcfe88bbf
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Jul 21 21:17:57 2021 +0000
description:
lint: rename grammar rules for specifier-qualifier-list
No functional change.
diffstat:
tests/usr.bin/xlint/lint1/decl_struct_member.c | 6 ++--
usr.bin/xlint/lint1/cgram.y | 36 +++++++++++++-------------
2 files changed, 21 insertions(+), 21 deletions(-)
diffs (139 lines):
diff -r 68ab7ff115b0 -r 1dadcfe88bbf tests/usr.bin/xlint/lint1/decl_struct_member.c
--- a/tests/usr.bin/xlint/lint1/decl_struct_member.c Wed Jul 21 21:11:19 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl_struct_member.c Wed Jul 21 21:17:57 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl_struct_member.c,v 1.9 2021/07/15 21:00:05 rillig Exp $ */
+/* $NetBSD: decl_struct_member.c,v 1.10 2021/07/21 21:17:57 rillig Exp $ */
# 3 "decl_struct_member.c"
struct multi_attributes {
@@ -8,7 +8,7 @@
int deprecated;
};
-struct cover_begin_type_noclass_declspecs {
+struct cover_begin_type_specifier_qualifier_list {
int m1;
__attribute__((deprecated)) int m2;
const int m3;
@@ -24,7 +24,7 @@
number m2;
};
-struct cover_begin_type_noclass_declmods {
+struct cover_begin_type_qualifier_list {
const m1;
const volatile m2;
};
diff -r 68ab7ff115b0 -r 1dadcfe88bbf usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Wed Jul 21 21:11:19 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Wed Jul 21 21:17:57 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.332 2021/07/21 21:11:19 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.333 2021/07/21 21:17:57 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.332 2021/07/21 21:11:19 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.333 2021/07/21 21:17:57 rillig Exp $");
#endif
#include <limits.h>
@@ -773,21 +773,21 @@
| begin_type_declmods declmod
;
-begin_type_noclass_declspecs:
+begin_type_specifier_qualifier_list: /* see C11 6.7.2.1 */
begin_type_typespec {
add_type($1);
}
- | type_attribute begin_type_noclass_declspecs
- | begin_type_noclass_declmods type_specifier {
+ | type_attribute begin_type_specifier_qualifier_list
+ | begin_type_qualifier_list type_specifier {
add_type($2);
}
- | begin_type_noclass_declspecs T_QUAL {
+ | begin_type_specifier_qualifier_list T_QUAL {
add_qualifier($2);
}
- | begin_type_noclass_declspecs notype_type_specifier {
+ | begin_type_specifier_qualifier_list notype_type_specifier {
add_type($2);
}
- | begin_type_noclass_declspecs type_attribute
+ | begin_type_specifier_qualifier_list type_attribute
;
begin_type_typespec:
@@ -799,11 +799,11 @@
}
;
-begin_type_noclass_declmods:
+begin_type_qualifier_list:
begin_type T_QUAL {
add_qualifier($2);
}
- | begin_type_noclass_declmods T_QUAL {
+ | begin_type_qualifier_list T_QUAL {
add_qualifier($2);
}
;
@@ -948,25 +948,25 @@
;
struct_declaration: /* C99 6.7.2.1 */
- begin_type_noclass_declmods end_type {
+ begin_type_qualifier_list end_type {
/* too late, i know, but getsym() compensates it */
symtyp = FMEMBER;
} notype_struct_declarators type_attribute_opt T_SEMI {
symtyp = FVFT;
$$ = $4;
}
- | begin_type_noclass_declspecs end_type {
+ | begin_type_specifier_qualifier_list end_type {
symtyp = FMEMBER;
} type_struct_declarators type_attribute_opt T_SEMI {
symtyp = FVFT;
$$ = $4;
}
- | begin_type_noclass_declmods end_type type_attribute_opt T_SEMI {
+ | begin_type_qualifier_list end_type type_attribute_opt T_SEMI {
/* syntax error '%s' */
error(249, "member without type");
$$ = NULL;
}
- | begin_type_noclass_declspecs end_type type_attribute_opt T_SEMI {
+ | begin_type_specifier_qualifier_list end_type type_attribute_opt T_SEMI {
symtyp = FVFT;
if (!Sflag)
/* anonymous struct/union members is a C9X feature */
@@ -1363,16 +1363,16 @@
;
abstract_declaration:
- begin_type_noclass_declmods end_type {
+ begin_type_qualifier_list end_type {
$$ = declare_1_abstract(abstract_name());
}
- | begin_type_noclass_declspecs end_type {
+ | begin_type_specifier_qualifier_list end_type {
$$ = declare_1_abstract(abstract_name());
}
- | begin_type_noclass_declmods end_type abstract_declarator {
+ | begin_type_qualifier_list end_type abstract_declarator {
$$ = declare_1_abstract($3);
}
- | begin_type_noclass_declspecs end_type abstract_declarator {
+ | begin_type_specifier_qualifier_list end_type abstract_declarator {
$$ = declare_1_abstract($3);
}
;
Home |
Main Index |
Thread Index |
Old Index