Module Name:    src
Committed By:   rillig
Date:           Sun Jul 25 19:41:33 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: parse_type_name.c parse_type_name.exp

Log Message:
tests/lint: explain where the second __attribute__ comes from


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/parse_type_name.c \
    src/tests/usr.bin/xlint/lint1/parse_type_name.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/xlint/lint1/parse_type_name.c
diff -u src/tests/usr.bin/xlint/lint1/parse_type_name.c:1.5 src/tests/usr.bin/xlint/lint1/parse_type_name.c:1.6
--- src/tests/usr.bin/xlint/lint1/parse_type_name.c:1.5	Sun Jul 25 19:22:08 2021
+++ src/tests/usr.bin/xlint/lint1/parse_type_name.c	Sun Jul 25 19:41:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse_type_name.c,v 1.5 2021/07/25 19:22:08 rillig Exp $	*/
+/*	$NetBSD: parse_type_name.c,v 1.6 2021/07/25 19:41:33 rillig Exp $	*/
 # 3 "parse_type_name.c"
 
 /*
@@ -101,16 +101,15 @@ cover_abstract_decl_param_list(void)
 	sink(sizeof(void (*)() __attribute__(())));
 	/*
 	 * XXX: The grammar allows only a single type_attribute_opt.
-	 * Where does the second type_attribute go?
+	 * All following __attribute__ come from direct_abstract_declarator.
 	 */
-	sink(sizeof(
-	void (*)() __attribute__(()) __attribute__(())));
+	sink(sizeof(void (*)() __attribute__(()) __attribute__(())));
 
 	/* cover 'abstract_decl_lparen vararg_parameter_type_list T_RPAREN type_attribute_opt' */
 	sink(sizeof(void (*)(void) __attribute__(())));
 	/*
 	 * XXX: The grammar allows only a single type_attribute_opt.
-	 * Where does the second type_attribute go?
+	 * All following __attribute__ come from direct_abstract_declarator.
 	 */
 	sink(sizeof(void (*)(void) __attribute__(()) __attribute__(())));
 
@@ -121,7 +120,7 @@ cover_abstract_decl_param_list(void)
 	sink(sizeof(void (*)(goto) __attribute__(())));
 	/*
 	 * XXX: The grammar allows only a single type_attribute_opt.
-	 * Where does the second type_attribute go?
+	 * All following __attribute__ come from direct_abstract_declarator.
 	 */
 	/* expect+1: syntax error 'goto' [249] */
 	sink(sizeof(void (*)(goto) __attribute__(()) __attribute__(())));
Index: src/tests/usr.bin/xlint/lint1/parse_type_name.exp
diff -u src/tests/usr.bin/xlint/lint1/parse_type_name.exp:1.5 src/tests/usr.bin/xlint/lint1/parse_type_name.exp:1.6
--- src/tests/usr.bin/xlint/lint1/parse_type_name.exp:1.5	Sun Jul 25 19:22:08 2021
+++ src/tests/usr.bin/xlint/lint1/parse_type_name.exp	Sun Jul 25 19:41:33 2021
@@ -1,7 +1,7 @@
 parse_type_name.c(52): error: cannot take size/alignment of function [144]
 parse_type_name.c(72): error: null dimension [17]
 parse_type_name.c(76): error: null dimension [17]
-parse_type_name.c(119): error: syntax error 'goto' [249]
-parse_type_name.c(121): error: syntax error 'goto' [249]
-parse_type_name.c(127): error: syntax error 'goto' [249]
-parse_type_name.c(141): warning: ANSI C requires formal parameter before '...' [84]
+parse_type_name.c(118): error: syntax error 'goto' [249]
+parse_type_name.c(120): error: syntax error 'goto' [249]
+parse_type_name.c(126): error: syntax error 'goto' [249]
+parse_type_name.c(140): warning: ANSI C requires formal parameter before '...' [84]

Reply via email to