Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: do not allow __packed or _Alignas ...



details:   https://anonhg.NetBSD.org/src/rev/dd6804ac1ed8
branches:  trunk
changeset: 1022220:dd6804ac1ed8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 10 05:42:29 2021 +0000

description:
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.

diffstat:

 usr.bin/xlint/lint1/cgram.y |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r b12505a70150 -r dd6804ac1ed8 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Jul 10 05:03:03 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Jul 10 05:42:29 2021 +0000
@@ -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



Home | Main Index | Thread Index | Old Index