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 handle "extern __attribute__((__gnu_inli...



details:   https://anonhg.NetBSD.org/src/rev/8d3b7b7e6c57
branches:  trunk
changeset: 346586:8d3b7b7e6c57
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 20 17:42:14 2016 +0000

description:
handle "extern __attribute__((__gnu_inline__)) __inline"

diffstat:

 usr.bin/xlint/lint1/cgram.y |  10 ++++++----
 usr.bin/xlint/lint1/scan.l  |   6 ++++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diffs (88 lines):

diff -r 2f0bee9c2f2a -r 8d3b7b7e6c57 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Wed Jul 20 17:03:50 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Wed Jul 20 17:42:14 2016 +0000
@@ -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 @@
 }
 %}
 
-%expect 80
+%expect 88
 
 %union {
        int     y_int;
@@ -200,6 +200,7 @@
 %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 @@
        }
        | 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 @@
                addtype($2);
          }
        | type_attribute declspecs
-       | declspecs type_attribute
        | declspecs declmod
        | declspecs notype_typespec {
                addtype($2);
@@ -576,6 +577,7 @@
        | T_SCLASS {
                addscl($1);
          }
+       | type_attribute
        ;
 
 clrtyp_typespec:
diff -r 2f0bee9c2f2a -r 8d3b7b7e6c57 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Wed Jul 20 17:03:50 2016 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Wed Jul 20 17:42:14 2016 +0000
@@ -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 @@
        { "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 },



Home | Main Index | Thread Index | Old Index