Module Name: src
Committed By: christos
Date: Wed Jul 20 17:42:14 UTC 2016
Modified Files:
src/usr.bin/xlint/lint1: cgram.y scan.l
Log Message:
handle "extern __attribute__((__gnu_inline__)) __inline"
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.65 -r1.66 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.76 src/usr.bin/xlint/lint1/cgram.y:1.77
--- src/usr.bin/xlint/lint1/cgram.y:1.76 Sat Feb 27 16:37:14 2016
+++ src/usr.bin/xlint/lint1/cgram.y Wed Jul 20 13:42:14 2016
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.76 2016/02/27 21:37:14 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.77 2016/07/20 17:42:14 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.76 2016/02/27 21:37:14 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.77 2016/07/20 17:42:14 christos Exp $");
#endif
#include <stdlib.h>
@@ -117,7 +117,7 @@ anonymize(sym_t *s)
}
%}
-%expect 80
+%expect 88
%union {
int y_int;
@@ -200,6 +200,7 @@ anonymize(sym_t *s)
%token <y_type> T_AT_ALIGNED
%token <y_type> T_AT_DEPRECATED
%token <y_type> T_AT_NORETURN
+%token <y_type> T_AT_GNU_INLINE
%token <y_type> T_AT_MAY_ALIAS
%token <y_type> T_AT_PACKED
%token <y_type> T_AT_PURE
@@ -510,6 +511,7 @@ type_attribute_spec:
}
| T_AT_PURE
| T_AT_TUNION
+ | T_AT_GNU_INLINE
| T_AT_FORMAT T_LPARN type_attribute_format_type T_COMMA
constant T_COMMA constant T_RPARN
| T_AT_UNUSED
@@ -552,7 +554,6 @@ declspecs:
addtype($2);
}
| type_attribute declspecs
- | declspecs type_attribute
| declspecs declmod
| declspecs notype_typespec {
addtype($2);
@@ -576,6 +577,7 @@ declmod:
| T_SCLASS {
addscl($1);
}
+ | type_attribute
;
clrtyp_typespec:
Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.65 src/usr.bin/xlint/lint1/scan.l:1.66
--- src/usr.bin/xlint/lint1/scan.l:1.65 Sat Feb 27 16:37:14 2016
+++ src/usr.bin/xlint/lint1/scan.l Wed Jul 20 13:42:14 2016
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: scan.l,v 1.65 2016/02/27 21:37:14 christos Exp $ */
+/* $NetBSD: scan.l,v 1.66 2016/07/20 17:42:14 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.65 2016/02/27 21:37:14 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.66 2016/07/20 17:42:14 christos Exp $");
#endif
#include <stdlib.h>
@@ -215,6 +215,8 @@ static struct kwtab {
{ "transparent_union",T_AT_TUNION,0, 0, 0, 0, 0, 1, 1 },
{ "__unused__", T_AT_UNUSED, 0, 0, 0, 0, 0, 1, 1 },
{ "unused", T_AT_UNUSED, 0, 0, 0, 0, 0, 1, 1 },
+ { "__gnu_inline__",T_AT_GNU_INLINE,0, 0, 0, 0, 0, 1, 1 },
+ { "gnu_inline", T_AT_GNU_INLINE,0, 0, 0, 0, 0, 1, 1 },
{ "__deprecated__",T_AT_DEPRECATED,0, 0, 0, 0, 0, 1, 1 },
{ "deprecated", T_AT_DEPRECATED,0, 0, 0, 0, 0, 1, 1 },
{ "__may_alias__",T_AT_MAY_ALIAS,0, 0, 0, 0, 0, 1, 1 },