Module Name:    src
Committed By:   christos
Date:           Fri Dec 30 02:16:36 UTC 2016

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

Log Message:
add bounded, fix nonnull


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.74 -r1.75 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.88 src/usr.bin/xlint/lint1/cgram.y:1.89
--- src/usr.bin/xlint/lint1/cgram.y:1.88	Thu Dec 29 18:54:29 2016
+++ src/usr.bin/xlint/lint1/cgram.y	Thu Dec 29 21:16:36 2016
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.88 2016/12/29 23:54:29 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.89 2016/12/30 02:16:36 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.88 2016/12/29 23:54:29 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.89 2016/12/30 02:16:36 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -201,6 +201,7 @@ anonymize(sym_t *s)
 %token <y_type>		T_AT_ALIAS
 %token <y_type>		T_AT_ALIGNED
 %token <y_type>		T_AT_ALWAYS_INLINE
+%token <y_type>		T_AT_BOUNDED
 %token <y_type>		T_AT_COLD
 %token <y_type>		T_AT_CONSTRUCTOR
 %token <y_type>		T_AT_DEPRECATED
@@ -212,15 +213,17 @@ anonymize(sym_t *s)
 %token <y_type>		T_AT_FORMAT_STRFMON
 %token <y_type>		T_AT_GNU_INLINE
 %token <y_type>		T_AT_MAY_ALIAS
+%token <y_type>		T_AT_MINBYTES
 %token <y_type>		T_AT_MODE
 %token <y_type>		T_AT_NORETURN
-%token <y_type>		T_AT_NON_NULL
+%token <y_type>		T_AT_NONNULL
 %token <y_type>		T_AT_NO_INSTRUMENT_FUNCTION
 %token <y_type>		T_AT_PACKED
 %token <y_type>		T_AT_PURE
 %token <y_type>		T_AT_RETURNS_TWICE
 %token <y_type>		T_AT_SECTION
 %token <y_type>		T_AT_SENTINEL
+%token <y_type>		T_AT_STRING
 %token <y_type>		T_AT_TUINION
 %token <y_type>		T_AT_TUNION
 %token <y_type>		T_AT_UNUSED
@@ -512,9 +515,13 @@ type_attribute_format_type:
 type_attribute_spec:
 	  T_AT_DEPRECATED
 	| T_AT_ALIGNED T_LPARN constant T_RPARN
+	| T_AT_BOUNDED T_LPARN T_AT_MINBYTES T_COMMA constant T_COMMA
+	  constant T_RPARN
+	| T_AT_BOUNDED T_LPARN T_AT_STRING T_COMMA constant T_COMMA
+	  constant T_RPARN
 	| T_AT_SENTINEL T_LPARN constant T_RPARN
 	| T_AT_FORMAT_ARG T_LPARN constant T_RPARN
-	| T_AT_NON_NULL T_LPARN constant T_RPARN
+	| 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_SECTION T_LPARN string T_RPARN

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.74 src/usr.bin/xlint/lint1/scan.l:1.75
--- src/usr.bin/xlint/lint1/scan.l:1.74	Thu Dec 29 19:57:10 2016
+++ src/usr.bin/xlint/lint1/scan.l	Thu Dec 29 21:16:36 2016
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.74 2016/12/30 00:57:10 christos Exp $ */
+/* $NetBSD: scan.l,v 1.75 2016/12/30 02:16:36 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.74 2016/12/30 00:57:10 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.75 2016/12/30 02:16:36 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -215,6 +215,7 @@ static	struct	kwtab {
 	{ "asm",	T_ASM,		0,	0,	0,	  0,0,1,0,7 },
 	{ "attribute",	T_ATTRIBUTE,	0,	0,	0,	  0,0,1,0,6 },
 	{ "auto",	T_SCLASS,	AUTO,	0,	0,	  0,0,0,0,1 },
+	{ "bounded",	T_AT_BOUNDED,	0,	0,	0,	  0,0,1,1,5 },
 	{ "break",	T_BREAK,	0,	0,	0,	  0,0,0,0,1 },
 	{ "case",	T_CASE,		0,	0,	0,	  0,0,0,0,1 },
 	{ "char",	T_TYPE,		0,	CHAR,	0,	  0,0,0,0,1 },
@@ -242,10 +243,11 @@ static	struct	kwtab {
 	{ "int",	T_TYPE,		0,	INT,	0,	  0,0,0,0,1 },
 	{ "long",	T_TYPE,		0,	LONG,	0,	  0,0,0,0,1 },
 	{ "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 },
 	{ "no_instrument_function", T_AT_NO_INSTRUMENT_FUNCTION,
 					0,	0,	0,	  0,0,1,1,5 },
-	{ "non_null",	T_AT_NON_NULL,	0,	0,	0,	  0,0,1,1,5 },
+	{ "nonnull",	T_AT_NONNULL,	0,	0,	0,	  0,0,1,1,5 },
 	{ "noreturn",	T_AT_NORETURN,	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 },
@@ -265,6 +267,7 @@ static	struct	kwtab {
 	{ "static",	T_SCLASS,	STATIC,	0,	0,	  0,0,0,0,1 },
 	{ "strfmon",	T_AT_FORMAT_STRFMON,0,	0,	0,	  0,0,1,1,5 },
 	{ "strftime",	T_AT_FORMAT_STRFTIME,0,	0,	0,	  0,0,1,1,5 },
+	{ "string",	T_AT_STRING,	0,	0,	0,	  0,0,1,1,5 },
 	{ "struct",	T_SOU,		0,	STRUCT,	0,	  0,0,0,0,1 },
 	{ "switch",	T_SWITCH,	0,	0,	0,	  0,0,0,0,1 },
 	{ "symbolrename", T_SYMBOLRENAME, 0,	0,	0,	  0,0,0,0,2 },

Reply via email to