Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 add bounded, fix nonnull
details: https://anonhg.NetBSD.org/src/rev/21f80fa9410d
branches: trunk
changeset: 349976:21f80fa9410d
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 30 02:16:36 2016 +0000
description:
add bounded, fix nonnull
diffstat:
usr.bin/xlint/lint1/cgram.y | 15 +++++++++++----
usr.bin/xlint/lint1/scan.l | 9 ++++++---
2 files changed, 17 insertions(+), 7 deletions(-)
diffs (109 lines):
diff -r 1763dc0f68fb -r 21f80fa9410d usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Fri Dec 30 00:57:10 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Fri Dec 30 02:16:36 2016 +0000
@@ -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 @@
%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 @@
%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_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
diff -r 1763dc0f68fb -r 21f80fa9410d usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l Fri Dec 30 00:57:10 2016 +0000
+++ b/usr.bin/xlint/lint1/scan.l Fri Dec 30 02:16:36 2016 +0000
@@ -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 @@
{ "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 @@
{ "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", 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 },
Home |
Main Index |
Thread Index |
Old Index