Module Name:    src
Committed By:   christos
Date:           Fri Sep 18 14:19:08 UTC 2020

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y scan.l

Log Message:
add optimize attribute


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.91 -r1.92 src/usr.bin/xlint/lint1/scan.l

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.104 src/usr.bin/xlint/lint1/cgram.y:1.105
--- src/usr.bin/xlint/lint1/cgram.y:1.104	Mon Mar  4 12:45:16 2019
+++ src/usr.bin/xlint/lint1/cgram.y	Fri Sep 18 10:19:08 2020
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.104 2019/03/04 17:45:16 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.105 2020/09/18 14:19:08 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.104 2019/03/04 17:45:16 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.105 2020/09/18 14:19:08 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -228,6 +228,7 @@ anonymize(sym_t *s)
 %token <y_type>		T_AT_NORETURN
 %token <y_type>		T_AT_NOTHROW
 %token <y_type>		T_AT_NO_INSTRUMENT_FUNCTION
+%token <y_type>		T_AT_OPTIMIZE
 %token <y_type>		T_AT_PACKED
 %token <y_type>		T_AT_PCS
 %token <y_type>		T_AT_PURE
@@ -546,6 +547,7 @@ type_attribute_spec:
 	| T_AT_NONNULL T_LPARN constant T_RPARN
 	| T_AT_MODE T_LPARN T_NAME T_RPARN
 	| T_AT_ALIAS T_LPARN string T_RPARN
+	| T_AT_OPTIMIZE T_LPARN string T_RPARN
 	| T_AT_PCS T_LPARN string T_RPARN
 	| T_AT_SECTION T_LPARN string T_RPARN
 	| T_AT_TLS_MODEL T_LPARN string T_RPARN

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.91 src/usr.bin/xlint/lint1/scan.l:1.92
--- src/usr.bin/xlint/lint1/scan.l:1.91	Sat Nov  9 14:54:09 2019
+++ src/usr.bin/xlint/lint1/scan.l	Fri Sep 18 10:19:08 2020
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.91 2019/11/09 19:54:09 christos Exp $ */
+/* $NetBSD: scan.l,v 1.92 2020/09/18 14:19:08 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: scan.l,v 1.91 2019/11/09 19:54:09 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.92 2020/09/18 14:19:08 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -265,6 +265,7 @@ static	struct	kwtab {
 	{ "noinline",	T_AT_NOINLINE,	0,	0,	0,	  0,0,1,1,5 },
 	{ "noreturn",	T_AT_NORETURN,	0,	0,	0,	  0,0,1,1,5 },
 	{ "nothrow",	T_AT_NOTHROW,	0,	0,	0,	  0,0,1,1,5 },
+	{ "optimize",	T_AT_OPTIMIZE,	0,	0,	0,	  0,0,1,1,5 },
 	{ "packed",	T_AT_PACKED,	0,	0,	0,	  0,0,1,1,5 },
 	{ "packed",	T_PACKED,	0,	0,	0,	  0,0,0,0,2 },
 	{ "pcs",	T_AT_PCS,	0,	0,	0,	  0,0,0,0,5 },

Reply via email to