Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: explain where the seco...
details: https://anonhg.NetBSD.org/src/rev/f980dea1b548
branches: trunk
changeset: 1022584:f980dea1b548
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 25 19:41:33 2021 +0000
description:
tests/lint: explain where the second __attribute__ comes from
diffstat:
tests/usr.bin/xlint/lint1/parse_type_name.c | 11 +++++------
tests/usr.bin/xlint/lint1/parse_type_name.exp | 8 ++++----
2 files changed, 9 insertions(+), 10 deletions(-)
diffs (53 lines):
diff -r ad6f0bca5536 -r f980dea1b548 tests/usr.bin/xlint/lint1/parse_type_name.c
--- a/tests/usr.bin/xlint/lint1/parse_type_name.c Sun Jul 25 19:27:26 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/parse_type_name.c Sun Jul 25 19:41:33 2021 +0000
@@ -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 @@
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 @@
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__(())));
diff -r ad6f0bca5536 -r f980dea1b548 tests/usr.bin/xlint/lint1/parse_type_name.exp
--- a/tests/usr.bin/xlint/lint1/parse_type_name.exp Sun Jul 25 19:27:26 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/parse_type_name.exp Sun Jul 25 19:41:33 2021 +0000
@@ -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]
Home |
Main Index |
Thread Index |
Old Index