Module Name: src
Committed By: christos
Date: Tue Apr 20 21:48:39 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: cgram.y lex.c
Log Message:
Add common attribute
To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/xlint/lint1/lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.219 src/usr.bin/xlint/lint1/cgram.y:1.220
--- src/usr.bin/xlint/lint1/cgram.y:1.219 Sun Apr 18 17:53:37 2021
+++ src/usr.bin/xlint/lint1/cgram.y Tue Apr 20 17:48:39 2021
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.219 2021/04/18 21:53:37 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.220 2021/04/20 21:48:39 christos 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.219 2021/04/18 21:53:37 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.220 2021/04/20 21:48:39 christos Exp $");
#endif
#include <limits.h>
@@ -215,6 +215,7 @@ anonymize(sym_t *s)
%token <y_type> T_AT_BOUNDED
%token <y_type> T_AT_BUFFER
%token <y_type> T_AT_COLD
+%token <y_type> T_AT_COMMON
%token <y_type> T_AT_CONSTRUCTOR
%token <y_type> T_AT_DEPRECATED
%token <y_type> T_AT_DESTRUCTOR
@@ -578,6 +579,7 @@ type_attribute_spec:
| T_AT_NORETURN
| T_AT_NOTHROW
| T_AT_COLD
+ | T_AT_COMMON
| T_AT_RETURNS_TWICE
| T_AT_PACKED {
addpacked();
Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.28 src/usr.bin/xlint/lint1/lex.c:1.29
--- src/usr.bin/xlint/lint1/lex.c:1.28 Sun Apr 18 04:00:13 2021
+++ src/usr.bin/xlint/lint1/lex.c Tue Apr 20 17:48:39 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.28 2021/04/18 08:00:13 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.29 2021/04/20 21:48:39 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.28 2021/04/18 08:00:13 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.29 2021/04/20 21:48:39 christos Exp $");
#endif
#include <ctype.h>
@@ -157,6 +157,7 @@ static struct kwtab {
kwdef_token( "case", T_CASE, 0,0,0,0,1),
kwdef_type( "char", CHAR, 0,0,0,0,1),
kwdef_token( "cold", T_AT_COLD, 0,0,1,1,5),
+ kwdef_token( "common", T_AT_COMMON, 0,0,1,1,5),
kwdef_tqual( "const", CONST, 1,0,0,0,7),
kwdef_token( "constructor", T_AT_CONSTRUCTOR, 0,0,1,1,5),
kwdef_token( "continue", T_CONTINUE, 0,0,0,0,1),