Module Name: src
Committed By: christos
Date: Fri Apr 18 02:41:17 UTC 2014
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
handle constant attribute
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 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.61 src/usr.bin/xlint/lint1/cgram.y:1.62
--- src/usr.bin/xlint/lint1/cgram.y:1.61 Thu Apr 17 20:23:46 2014
+++ src/usr.bin/xlint/lint1/cgram.y Thu Apr 17 22:41:17 2014
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.61 2014/04/18 00:23:46 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.62 2014/04/18 02:41:17 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.61 2014/04/18 00:23:46 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.62 2014/04/18 02:41:17 christos Exp $");
#endif
#include <stdlib.h>
@@ -495,6 +495,10 @@ type_attribute_spec:
| T_AT_FORMAT T_LPARN type_attribute_format_type T_COMMA
constant T_COMMA constant T_RPARN
| T_AT_UNUSED
+ | T_QUAL {
+ if ($1 != CONST)
+ yyerror("Bad attribute");
+ }
;
type_attribute: