Module Name: src
Committed By: christos
Date: Mon Mar 6 11:58:31 UTC 2017
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
handle typeof in casts
To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 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.92 src/usr.bin/xlint/lint1/cgram.y:1.93
--- src/usr.bin/xlint/lint1/cgram.y:1.92 Sat Jan 7 13:28:49 2017
+++ src/usr.bin/xlint/lint1/cgram.y Mon Mar 6 06:58:31 2017
@@ -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 @@ anonymize(sym_t *s)
}
%}
-%expect 100
+%expect 107
%union {
int y_int;
@@ -1362,7 +1362,10 @@ init_rbrace:
;
type_name:
- {
+ T_TYPEOF term {
+ $$ = $2->tn_type;
+ }
+ | {
pushdecl(ABSTRACT);
} abstract_declaration {
popdecl();