Module Name: src Committed By: rillig Date: Tue Jul 6 06:38:29 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: gcc_attribute.c Log Message: tests/lint: document wrong handling of GCC __attribute__ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/gcc_attribute.c 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/gcc_attribute.c diff -u src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.5 src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.6 --- src/tests/usr.bin/xlint/lint1/gcc_attribute.c:1.5 Mon May 3 07:08:54 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_attribute.c Tue Jul 6 06:38:29 2021 @@ -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 @@ local_variable_pcs(void) 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__)) +);