Module Name: src Committed By: christos Date: Sat Feb 27 21:37:14 UTC 2016
Modified Files: src/usr.bin/xlint/lint1: cgram.y scan.l Log Message: Add visibility and weak To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.64 -r1.65 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.75 src/usr.bin/xlint/lint1/cgram.y:1.76 --- src/usr.bin/xlint/lint1/cgram.y:1.75 Sat Jan 2 12:44:33 2016 +++ src/usr.bin/xlint/lint1/cgram.y Sat Feb 27 16:37:14 2016 @@ -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 @@ anonymize(sym_t *s) %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 @@ type_attribute_spec: | 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"); Index: src/usr.bin/xlint/lint1/scan.l diff -u src/usr.bin/xlint/lint1/scan.l:1.64 src/usr.bin/xlint/lint1/scan.l:1.65 --- src/usr.bin/xlint/lint1/scan.l:1.64 Fri Nov 13 14:13:50 2015 +++ src/usr.bin/xlint/lint1/scan.l Sat Feb 27 16:37:14 2016 @@ -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 @@ static struct kwtab { { "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 } };