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 more gnu attributes
details: https://anonhg.NetBSD.org/src/rev/1d4ced5e9b23
branches: trunk
changeset: 449332:1d4ced5e9b23
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 03 23:06:08 2019 +0000
description:
Add more gnu attributes
diffstat:
usr.bin/xlint/lint1/cgram.y | 10 ++++++++--
usr.bin/xlint/lint1/scan.l | 7 +++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diffs (106 lines):
diff -r df1cbbf539f7 -r 1d4ced5e9b23 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Sun Mar 03 22:32:27 2019 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Sun Mar 03 23:06:08 2019 +0000
@@ -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 @@
/* 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 @@
%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 @@
| 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 @@
| 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 {
diff -r df1cbbf539f7 -r 1d4ced5e9b23 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l Sun Mar 03 22:32:27 2019 +0000
+++ b/usr.bin/xlint/lint1/scan.l Sun Mar 03 23:06:08 2019 +0000
@@ -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 @@
{ "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 @@
{ "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 @@
{ "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 },
Home |
Main Index |
Thread Index |
Old Index