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 typeof and extension don't need parens



details:   https://anonhg.NetBSD.org/src/rev/1597b3f9c518
branches:  trunk
changeset: 328773:1597b3f9c518
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 17 17:29:24 2014 +0000

description:
typeof and extension don't need parens

diffstat:

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

diffs (58 lines):

diff -r 97eb69da598a -r 1597b3f9c518 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Thu Apr 17 16:30:05 2014 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Thu Apr 17 17:29:24 2014 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.59 2014/03/23 04:58:16 dholland Exp $ */
+/* $NetBSD: cgram.y,v 1.60 2014/04/17 17:29:24 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.59 2014/03/23 04:58:16 dholland Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.60 2014/04/17 17:29:24 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -107,7 +107,7 @@
 #endif
 %}
 
-%expect 5
+%expect 12
 
 %union {
        int     y_int;
@@ -555,8 +555,8 @@
          T_TYPE {
                $$ = gettyp($1);
          }
-       | T_TYPEOF T_LPARN term T_RPARN {
-               $$ = $3->tn_type;
+       | T_TYPEOF term {
+               $$ = $2->tn_type;
          }
        | struct_spec {
                popdecl();
@@ -1731,15 +1731,15 @@
        | T_IMAG term {
                $$ = build(IMAG, $2, NULL);
          }
+       | T_EXTENSION term {
+               $$ = $2;
+         }
        | T_REAL T_LPARN term T_RPARN {
                $$ = build(REAL, $3, NULL);
          }
        | T_IMAG T_LPARN term T_RPARN {
                $$ = build(IMAG, $3, NULL);
          }
-       | T_EXTENSION T_LPARN term T_RPARN {
-               $$ = $3;
-         }
        | T_SIZEOF term                                 %prec T_SIZEOF {
                if (($$ = $2 == NULL ? NULL : bldszof($2->tn_type)) != NULL)
                        chkmisc($2, 0, 0, 0, 0, 0, 1);



Home | Main Index | Thread Index | Old Index