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 handle constant attribute



details:   https://anonhg.NetBSD.org/src/rev/daab319b3913
branches:  trunk
changeset: 795552:daab319b3913
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 18 02:41:17 2014 +0000

description:
handle constant attribute

diffstat:

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

diffs (30 lines):

diff -r ce468d135d9e -r daab319b3913 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Fri Apr 18 02:28:06 2014 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Fri Apr 18 02:41:17 2014 +0000
@@ -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 @@
        | 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:



Home | Main Index | Thread Index | Old Index