Module Name: src
Committed By: christos
Date: Wed Jul 20 18:14:12 UTC 2016
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
accept attributes in param decls
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/xlint/lint1/cgram.y
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.77 src/usr.bin/xlint/lint1/cgram.y:1.78
--- src/usr.bin/xlint/lint1/cgram.y:1.77 Wed Jul 20 13:42:14 2016
+++ src/usr.bin/xlint/lint1/cgram.y Wed Jul 20 14:14:12 2016
@@ -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 @@ param_decl:
;
direct_param_decl:
- identifier {
+ identifier type_attribute {
+ $$ = dname(getsym($1));
+ }
+ | identifier {
$$ = dname(getsym($1));
}
| T_LPARN notype_param_decl T_RPARN {