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 alias attribute
details: https://anonhg.NetBSD.org/src/rev/f4d52b5f4858
branches: trunk
changeset: 820097:f4d52b5f4858
user: christos <christos%NetBSD.org@localhost>
date: Thu Dec 29 18:44:49 2016 +0000
description:
Add alias attribute
diffstat:
usr.bin/xlint/lint1/cgram.y | 6 ++++--
usr.bin/xlint/lint1/scan.l | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (63 lines):
diff -r 2b7f34b0a587 -r f4d52b5f4858 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Thu Dec 29 18:37:32 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Thu Dec 29 18:44:49 2016 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.85 2016/12/29 18:37:32 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.86 2016/12/29 18:44:49 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.85 2016/12/29 18:37:32 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.86 2016/12/29 18:44:49 christos Exp $");
#endif
#include <stdlib.h>
@@ -198,6 +198,7 @@
%token T_PACKED
/* Type Attributes */
%token <y_type> T_ATTRIBUTE
+%token <y_type> T_AT_ALIAS
%token <y_type> T_AT_ALIGNED
%token <y_type> T_AT_ALWAYS_INLINE
%token <y_type> T_AT_COLD
@@ -513,6 +514,7 @@
| T_AT_SENTINEL T_LPARN constant T_RPARN
| T_AT_FORMAT_ARG T_LPARN constant T_RPARN
| T_AT_MODE T_LPARN T_NAME T_RPARN
+ | T_AT_ALIAS T_LPARN string T_RPARN
| T_AT_SECTION T_LPARN string T_RPARN
| T_AT_ALIGNED
| T_AT_CONSTRUCTOR
diff -r 2b7f34b0a587 -r f4d52b5f4858 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l Thu Dec 29 18:37:32 2016 +0000
+++ b/usr.bin/xlint/lint1/scan.l Thu Dec 29 18:44:49 2016 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: scan.l,v 1.70 2016/12/29 18:37:32 christos Exp $ */
+/* $NetBSD: scan.l,v 1.71 2016/12/29 18:44:49 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.70 2016/12/29 18:37:32 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.71 2016/12/29 18:44:49 christos Exp $");
#endif
#include <stdlib.h>
@@ -209,6 +209,8 @@
{ "__attribute",T_ATTRIBUTE, 0, 0, 0, 0, 0, 1, 0 },
{ "__packed__", T_AT_PACKED, 0, 0, 0, 0, 0, 1, 1 },
{ "packed", T_AT_PACKED, 0, 0, 0, 0, 0, 1, 1 },
+ { "__alias__", T_AT_ALIAS, 0, 0, 0, 0, 0, 1, 1 },
+ { "alias", T_AT_ALIAS, 0, 0, 0, 0, 0, 1, 1 },
{ "__aligned__",T_AT_ALIGNED, 0, 0, 0, 0, 0, 1, 1 },
{ "aligned", T_AT_ALIGNED, 0, 0, 0, 0, 0, 1, 1 },
{ "__transparent_union__",T_AT_TUNION,0,0, 0, 0, 0, 1, 1 },
Home |
Main Index |
Thread Index |
Old Index