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 typeof in casts



details:   https://anonhg.NetBSD.org/src/rev/46050cdeaffb
branches:  trunk
changeset: 822191:46050cdeaffb
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 06 11:58:31 2017 +0000

description:
handle typeof in casts

diffstat:

 usr.bin/xlint/lint1/cgram.y |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r b4ac4855cce2 -r 46050cdeaffb usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Mon Mar 06 11:34:53 2017 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Mon Mar 06 11:58:31 2017 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.92 2017/01/07 18:28:49 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.93 2017/03/06 11:58:31 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.92 2017/01/07 18:28:49 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.93 2017/03/06 11:58:31 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -117,7 +117,7 @@
 }
 %}
 
-%expect 100
+%expect 107
 
 %union {
        int     y_int;
@@ -1362,7 +1362,10 @@
        ;
 
 type_name:
-         {
+         T_TYPEOF term  {
+               $$ = $2->tn_type;
+         }
+       | {
                pushdecl(ABSTRACT);
          } abstract_declaration {
                popdecl();



Home | Main Index | Thread Index | Old Index