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 visibility and weak



details:   https://anonhg.NetBSD.org/src/rev/3296a8b5dd3b
branches:  trunk
changeset: 343825:3296a8b5dd3b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 27 21:37:14 2016 +0000

description:
Add visibility and weak

diffstat:

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

diffs (69 lines):

diff -r 505c9410cd6b -r 3296a8b5dd3b usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Feb 27 20:36:17 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Feb 27 21:37:14 2016 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.75 2016/01/02 17:44:33 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.76 2016/02/27 21:37: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.75 2016/01/02 17:44:33 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.76 2016/02/27 21:37:14 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -206,6 +206,8 @@
 %token <y_type>                T_AT_TUINION
 %token <y_type>                T_AT_TUNION
 %token <y_type>                T_AT_UNUSED
+%token <y_type>                T_AT_WEAK
+%token <y_type>                T_AT_VISIBILITY
 %token <y_type>                T_AT_FORMAT
 %token <y_type>                T_AT_FORMAT_PRINTF
 %token <y_type>                T_AT_FORMAT_SCANF
@@ -511,6 +513,8 @@
        | T_AT_FORMAT T_LPARN type_attribute_format_type T_COMMA
            constant T_COMMA constant T_RPARN
        | T_AT_UNUSED
+       | T_AT_WEAK
+       | T_AT_VISIBILITY T_LPARN constant T_RPARN
        | T_QUAL {
                if ($1 != CONST)        
                        yyerror("Bad attribute");
diff -r 505c9410cd6b -r 3296a8b5dd3b usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Sat Feb 27 20:36:17 2016 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Sat Feb 27 21:37:14 2016 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.64 2015/11/13 19:13:50 christos Exp $ */
+/* $NetBSD: scan.l,v 1.65 2016/02/27 21:37: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.64 2015/11/13 19:13:50 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.65 2016/02/27 21:37:14 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -294,6 +294,12 @@
        { "volatile",   T_QUAL,         0,      0,      VOLATILE, 1, 0, 0, 0 },
        { "__volatile__", T_QUAL,       0,      0,      VOLATILE, 0, 0, 0, 0 },
        { "__volatile", T_QUAL,         0,      0,      VOLATILE, 0, 0, 0, 0 },
+       { "visibility", T_AT_VISIBILITY,0,      0,      0,        0, 0, 1, 1 },
+       { "__visibility",T_AT_VISIBILITY,0,     0,      0,        0, 0, 1, 1 },
+       { "__visibility__",T_AT_VISIBILITY,0,   0,      0,        0, 0, 1, 1 },
+       { "weak",       T_AT_WEAK,      0,      0,      0,        0, 0, 1, 1 },
+       { "__weak",     T_AT_WEAK,      0,      0,      0,        0, 0, 1, 1 },
+       { "__weak__",   T_AT_WEAK,      0,      0,      0,        0, 0, 1, 1 },
        { "while",      T_WHILE,        0,      0,      0,        0, 0, 0, 0 },
        { NULL,         0,              0,      0,      0,        0, 0, 0, 0 }
 };



Home | Main Index | Thread Index | Old Index