Module Name:    src
Committed By:   christos
Date:           Sat Nov 27 20:13:48 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y lex.c

Log Message:
Add target attribute


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.87 -r1.88 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.370 src/usr.bin/xlint/lint1/cgram.y:1.371
--- src/usr.bin/xlint/lint1/cgram.y:1.370	Tue Nov 16 16:01:05 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Nov 27 15:13:48 2021
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.370 2021/11/16 21:01:05 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.371 2021/11/27 20:13:48 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.370 2021/11/16 21:01:05 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.371 2021/11/27 20:13:48 christos Exp $");
 #endif
 
 #include <limits.h>
@@ -257,6 +257,7 @@ anonymize(sym_t *s)
 %token			T_AT_SECTION
 %token			T_AT_SENTINEL
 %token			T_AT_STRING
+%token			T_AT_TARGET
 %token			T_AT_TLS_MODEL
 %token			T_AT_TUNION
 %token			T_AT_UNUSED
@@ -2098,6 +2099,7 @@ gcc_attribute_spec:
 	| T_AT_SECTION T_LPAREN string T_RPAREN
 	| T_AT_SENTINEL T_LPAREN constant_expr T_RPAREN
 	| T_AT_SENTINEL
+	| T_AT_TARGET T_LPAREN string T_RPAREN
 	| T_AT_TLS_MODEL T_LPAREN string T_RPAREN
 	| T_AT_TUNION
 	| T_AT_UNUSED {

Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.87 src/usr.bin/xlint/lint1/lex.c:1.88
--- src/usr.bin/xlint/lint1/lex.c:1.87	Tue Nov 16 13:33:14 2021
+++ src/usr.bin/xlint/lint1/lex.c	Sat Nov 27 15:13:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.87 2021/11/16 18:33:14 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.88 2021/11/27 20:13:48 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.87 2021/11/16 18:33:14 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.88 2021/11/27 20:13:48 christos Exp $");
 #endif
 
 #include <ctype.h>
@@ -224,6 +224,7 @@ static	struct	kwtab {
 	kwdef_keyword(	"switch",	T_SWITCH),
 	kwdef_token(	"__symbolrename",	T_SYMBOLRENAME,	0,0,0,0,1),
 	kwdef_gcc_attr(	"syslog",	T_AT_FORMAT_SYSLOG),
+	kwdef_gcc_attr(	"target",	T_AT_TARGET),
 	kwdef_tqual(	"__thread",	THREAD,			0,0,1,0,1),
 	kwdef_tqual(	"_Thread_local", THREAD,		0,1,0,0,1),
 	kwdef_gcc_attr(	"tls_model",	T_AT_TLS_MODEL),

Reply via email to