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: document wrong handlin...
details: https://anonhg.NetBSD.org/src/rev/137aa11fd62a
branches: trunk
changeset: 1022146:137aa11fd62a
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Jul 06 06:38:29 2021 +0000
description:
tests/lint: document wrong handling of GCC __attribute__
diffstat:
tests/usr.bin/xlint/lint1/gcc_attribute.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r 96f1c02f7f3d -r 137aa11fd62a tests/usr.bin/xlint/lint1/gcc_attribute.c
--- a/tests/usr.bin/xlint/lint1/gcc_attribute.c Tue Jul 06 05:39:27 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/gcc_attribute.c Tue Jul 06 06:38:29 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gcc_attribute.c,v 1.5 2021/05/03 07:08:54 rillig Exp $ */
+/* $NetBSD: gcc_attribute.c,v 1.6 2021/07/06 06:38:29 rillig Exp $ */
# 3 "gcc_attribute.c"
/*
@@ -53,3 +53,21 @@
int pcs = 3;
return pcs;
}
+
+/*
+ * FIXME: The attributes are handled by different grammar rules even though
+ * they occur in the same syntactical position.
+ *
+ * Grammar rule abstract_decl_param_list handles the first attribute.
+ *
+ * Grammar rule direct_abstract_declarator handles all remaining attributes.
+ *
+ * Since abstract_decl_param_list contains type_attribute_opt, this could be
+ * the source of the many shift/reduce conflicts in the grammar.
+ */
+int
+func(
+ int(int)
+ __attribute__((__noreturn__))
+ __attribute__((__noreturn__))
+);
Home |
Main Index |
Thread Index |
Old Index