Module Name:    src
Committed By:   christos
Date:           Sun Mar  3 23:06:08 UTC 2019

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

Log Message:
Add more gnu attributes


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.86 -r1.87 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.100 src/usr.bin/xlint/lint1/cgram.y:1.101
--- src/usr.bin/xlint/lint1/cgram.y:1.100	Fri Jan  4 13:51:23 2019
+++ src/usr.bin/xlint/lint1/cgram.y	Sun Mar  3 18:06:08 2019
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.100 2019/01/04 18:51:23 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.101 2019/03/03 23:06: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.100 2019/01/04 18:51:23 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.101 2019/03/03 23:06:08 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -201,6 +201,7 @@ anonymize(sym_t *s)
 /* Type Attributes */
 %token <y_type>		T_ATTRIBUTE
 %token <y_type>		T_AT_ALIAS
+%token <y_type>		T_AT_ALLOC_SIZE
 %token <y_type>		T_AT_ALIGNED
 %token <y_type>		T_AT_ALWAYS_INLINE
 %token <y_type>		T_AT_BOUNDED
@@ -217,12 +218,14 @@ anonymize(sym_t *s)
 %token <y_type>		T_AT_FORMAT_STRFTIME
 %token <y_type>		T_AT_FORMAT_SYSLOG
 %token <y_type>		T_AT_GNU_INLINE
+%token <y_type>		T_AT_MALLOC
 %token <y_type>		T_AT_MAY_ALIAS
 %token <y_type>		T_AT_MINBYTES
 %token <y_type>		T_AT_MODE
 %token <y_type>		T_AT_NOINLINE
 %token <y_type>		T_AT_NONNULL
 %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_PACKED
 %token <y_type>		T_AT_PCS
@@ -531,6 +534,7 @@ type_attribute_spec:
 	| T_AT_DEPRECATED T_LPARN string T_RPARN
 	| T_AT_DEPRECATED
 	| T_AT_ALIGNED T_LPARN constant T_RPARN
+	| T_AT_ALLOC_SIZE T_LPARN constant T_RPARN
 	| T_AT_BOUNDED T_LPARN type_attribute_bounded_type
 	  T_COMMA constant T_COMMA constant T_RPARN
 	| T_AT_SENTINEL T_LPARN constant T_RPARN
@@ -543,10 +547,12 @@ type_attribute_spec:
 	| T_AT_ALIGNED 
 	| T_AT_CONSTRUCTOR 
 	| T_AT_DESTRUCTOR 
+	| T_AT_MALLOC
 	| T_AT_MAY_ALIAS
 	| T_AT_NO_INSTRUMENT_FUNCTION
 	| T_AT_NOINLINE
 	| T_AT_NORETURN
+	| T_AT_NOTHROW
 	| T_AT_COLD
 	| T_AT_RETURNS_TWICE
 	| T_AT_PACKED {

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.86 src/usr.bin/xlint/lint1/scan.l:1.87
--- src/usr.bin/xlint/lint1/scan.l:1.86	Fri Jan  4 13:51:23 2019
+++ src/usr.bin/xlint/lint1/scan.l	Sun Mar  3 18:06:08 2019
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.86 2019/01/04 18:51:23 christos Exp $ */
+/* $NetBSD: scan.l,v 1.87 2019/03/03 23:06: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.86 2019/01/04 18:51:23 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.87 2019/03/03 23:06:08 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -216,6 +216,7 @@ static	struct	kwtab {
 	{ "alias",	T_AT_ALIAS,	0,	0,	0,	  0,0,1,1,5 },
 	{ "aligned",	T_AT_ALIGNED,	0,	0,	0,	  0,0,1,1,5 },
 	{ "alignof",	T_ALIGNOF,	0,	0,	0,	  0,0,0,0,4 },
+	{ "alloc_size",	T_AT_ALLOC_SIZE,0,	0,	0,	  0,0,1,1,5 },
 	{ "always_inline", T_AT_ALWAYS_INLINE, 0,0,	0,	  0,0,1,1,5 },
 	{ "asm",	T_ASM,		0,	0,	0,	  0,0,1,0,7 },
 	{ "attribute",	T_ATTRIBUTE,	0,	0,	0,	  0,0,1,0,6 },
@@ -250,6 +251,7 @@ static	struct	kwtab {
 	{ "inline",	T_SCLASS,	INLINE,	0,	0,	  0,1,0,0,7 },
 	{ "int",	T_TYPE,		0,	INT,	0,	  0,0,0,0,1 },
 	{ "long",	T_TYPE,		0,	LONG,	0,	  0,0,0,0,1 },
+	{ "malloc",	T_AT_MALLOC,	0,	0,	0,	  0,0,1,1,5 },
 	{ "may_alias",	T_AT_MAY_ALIAS,	0,	0,	0,	  0,0,1,1,5 },
 	{ "minbytes",	T_AT_MINBYTES,	0,	0,	0,	  0,0,1,1,5 },
 	{ "mode",	T_AT_MODE,	0,	0,	0,	  0,0,1,1,5 },
@@ -258,6 +260,7 @@ static	struct	kwtab {
 	{ "nonnull",	T_AT_NONNULL,	0,	0,	0,	  0,0,1,1,5 },
 	{ "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 },
 	{ "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