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 accept attributes in param decls



details:   https://anonhg.NetBSD.org/src/rev/660a1ecbbbef
branches:  trunk
changeset: 346588:660a1ecbbbef
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 20 18:14:12 2016 +0000

description:
accept attributes in param decls

diffstat:

 usr.bin/xlint/lint1/cgram.y |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 8344dd202019 -r 660a1ecbbbef usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Wed Jul 20 17:57:00 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Wed Jul 20 18:14:12 2016 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.77 2016/07/20 17:42:14 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.78 2016/07/20 18:14:12 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.77 2016/07/20 17:42:14 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.78 2016/07/20 18:14:12 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -1020,7 +1020,10 @@
        ;
 
 direct_param_decl:
-         identifier {
+         identifier type_attribute {
+               $$ = dname(getsym($1));
+         }
+       | identifier {
                $$ = dname(getsym($1));
          }
        | T_LPARN notype_param_decl T_RPARN {



Home | Main Index | Thread Index | Old Index