Sat Jul 10 05:42:30 2021 UTC ()
lint: do not allow __packed or _Alignas in statement

When the rule 'statement: type_attribute T_SEMI' was added in cgram.y
1.214 from 2021-04-14, type_attribute was the closest match since there
was no definition for gcc_attribute yet.


(rillig)
diff -r1.281 -r1.282 src/usr.bin/xlint/lint1/cgram.y

cvs diff -r1.281 -r1.282 src/usr.bin/xlint/lint1/cgram.y (expand / switch to context diff)
--- src/usr.bin/xlint/lint1/cgram.y 2021/07/10 05:03:03 1.281
+++ src/usr.bin/xlint/lint1/cgram.y 2021/07/10 05:42:29 1.282
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.281 2021/07/10 05:03:03 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.282 2021/07/10 05:42:29 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.281 2021/07/10 05:03:03 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.282 2021/07/10 05:42:29 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -1365,7 +1365,7 @@
 	;
 
 non_expr_statement:
-	  type_attribute T_SEMI
+	  gcc_attribute T_SEMI
 	| labeled_statement
 	| compound_statement
 	| selection_statement