Thu Jul 15 21:34:11 2021 UTC ()
tests/lint: cover abstract_declaration, discover internal error


(rillig)
diff -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/decl.c

cvs diff -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/decl.c (expand / switch to unified diff)

--- src/tests/usr.bin/xlint/lint1/decl.c 2021/07/15 21:00:05 1.6
+++ src/tests/usr.bin/xlint/lint1/decl.c 2021/07/15 21:34:11 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: decl.c,v 1.6 2021/07/15 21:00:05 rillig Exp $ */ 1/* $NetBSD: decl.c,v 1.7 2021/07/15 21:34:11 rillig Exp $ */
2# 3 "decl.c" 2# 3 "decl.c"
3 3
4/* 4/*
5 * Tests for declarations, especially the distinction between the 5 * Tests for declarations, especially the distinction between the
6 * declaration-specifiers and the declarators. 6 * declaration-specifiers and the declarators.
7 */ 7 */
8 8
9/* 9/*
10 * Even though 'const' comes after 'char' and is therefore quite close to the 10 * Even though 'const' comes after 'char' and is therefore quite close to the
11 * first identifier, it applies to both identifiers. 11 * first identifier, it applies to both identifiers.
12 */ 12 */
13void 13void
14specifier_qualifier(void) 14specifier_qualifier(void)
@@ -117,13 +117,21 @@ unused(void) @@ -117,13 +117,21 @@ unused(void)
117 117
118/* 118/*
119 * The attribute 'used' does not influence static functions, it only 119 * The attribute 'used' does not influence static functions, it only
120 * applies to function parameters. 120 * applies to function parameters.
121 */ 121 */
122/* LINTED */ 122/* LINTED */
123static void 123static void
124unused_linted(void) 124unused_linted(void)
125{ 125{
126} 126}
127 127
128/* covers 'type_qualifier_list: type_qualifier_list type_qualifier' */ 128/* covers 'type_qualifier_list: type_qualifier_list type_qualifier' */
129int *const volatile cover_type_qualifier_list; 129int *const volatile cover_type_qualifier_list;
 130
 131unsigned long cover_abstract_declaration_declmods = sizeof(const);
 132unsigned long cover_abstract_declaration_declmods_abstract_declarator =
 133 sizeof(const *);
 134// FIXME:
 135// lint: internal error in decl.c:833 near decl.c:135: end_type(unsigned long)
 136//unsigned long cover_abstract_declarator_typeof =
 137// sizeof(const typeof(cover_abstract_declaration_declmods));