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 type attributes after...
details: https://anonhg.NetBSD.org/src/rev/c8c5165ce334
branches: trunk
changeset: 365852:c8c5165ce334
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Apr 29 06:40:51 2022 +0000
description:
lint: do not allow type attributes after label
After a label, the type attributes _Alignas, __packed and _Noreturn do
not make sense, so don't allow them. The only kind of attributes that
makes sense there syntactically is GCC __attribute__. Allow multiple
such attributes, like everywhere in the GCC grammar.
diffstat:
usr.bin/xlint/lint1/cgram.y | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r c7118fb8b87a -r c8c5165ce334 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Thu Apr 28 21:38:38 2022 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Fri Apr 29 06:40:51 2022 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.403 2022/04/28 21:38:38 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.404 2022/04/29 06:40:51 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.403 2022/04/28 21:38:38 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.404 2022/04/29 06:40:51 rillig Exp $");
#endif
#include <limits.h>
@@ -126,7 +126,7 @@
%}
-%expect 132
+%expect 129
%union {
val_t *y_val;
@@ -1655,7 +1655,7 @@
;
labeled_statement: /* C99 6.8.1 */
- label type_attribute_opt statement
+ label gcc_attribute_list_opt statement
;
label:
Home |
Main Index |
Thread Index |
Old Index