Tue Jan 5 00:02:52 2021 UTC ()
lint: remove unused TBUILTIN_SIZEOF from the C grammar

This token is not generated by the lexer, and it was misspelled anyway.
All other token names start with "T_", this one was missing the
underscore.


(rillig)
diff -r1.130 -r1.131 src/usr.bin/xlint/lint1/cgram.y

cvs diff -r1.130 -r1.131 src/usr.bin/xlint/lint1/cgram.y (expand / switch to unified diff)

--- src/usr.bin/xlint/lint1/cgram.y 2021/01/03 21:33:50 1.130
+++ src/usr.bin/xlint/lint1/cgram.y 2021/01/05 00:02:52 1.131
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1%{ 1%{
2/* $NetBSD: cgram.y,v 1.130 2021/01/03 21:33:50 rillig Exp $ */ 2/* $NetBSD: cgram.y,v 1.131 2021/01/05 00:02:52 rillig Exp $ */
3 3
4/* 4/*
5 * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. 5 * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
6 * Copyright (c) 1994, 1995 Jochen Pohl 6 * Copyright (c) 1994, 1995 Jochen Pohl
7 * All Rights Reserved. 7 * All Rights Reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the 15 * notice, this list of conditions and the following disclaimer in the
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37#if defined(__RCSID) && !defined(lint) 37#if defined(__RCSID) && !defined(lint)
38__RCSID("$NetBSD: cgram.y,v 1.130 2021/01/03 21:33:50 rillig Exp $"); 38__RCSID("$NetBSD: cgram.y,v 1.131 2021/01/05 00:02:52 rillig Exp $");
39#endif 39#endif
40 40
41#include <limits.h> 41#include <limits.h>
42#include <stdlib.h> 42#include <stdlib.h>
43#include <string.h> 43#include <string.h>
44 44
45#include "lint1.h" 45#include "lint1.h"
46 46
47extern char *yytext; 47extern char *yytext;
48/* 48/*
49 * Contains the level of current declaration. 0 is extern. 49 * Contains the level of current declaration. 0 is extern.
50 * Used for symbol table entries. 50 * Used for symbol table entries.
51 */ 51 */
@@ -249,27 +249,27 @@ anonymize(sym_t *s) @@ -249,27 +249,27 @@ anonymize(sym_t *s)
249%left T_COMMA 249%left T_COMMA
250%right T_ASSIGN T_OPASS 250%right T_ASSIGN T_OPASS
251%right T_QUEST T_COLON 251%right T_QUEST T_COLON
252%left T_LOGOR 252%left T_LOGOR
253%left T_LOGAND 253%left T_LOGAND
254%left T_OR 254%left T_OR
255%left T_XOR 255%left T_XOR
256%left T_AND 256%left T_AND
257%left T_EQOP 257%left T_EQOP
258%left T_RELOP 258%left T_RELOP
259%left T_SHFTOP 259%left T_SHFTOP
260%left T_ADDOP 260%left T_ADDOP
261%left T_MULT T_DIVOP 261%left T_MULT T_DIVOP
262%right T_UNOP T_INCDEC T_SIZEOF TBUILTIN_SIZEOF T_ALIGNOF T_REAL T_IMAG 262%right T_UNOP T_INCDEC T_SIZEOF T_ALIGNOF T_REAL T_IMAG
263%left T_LPAREN T_LBRACK T_STROP 263%left T_LPAREN T_LBRACK T_STROP
264 264
265%token <y_sb> T_NAME 265%token <y_sb> T_NAME
266%token <y_sb> T_TYPENAME 266%token <y_sb> T_TYPENAME
267%token <y_val> T_CON 267%token <y_val> T_CON
268%token <y_string> T_STRING 268%token <y_string> T_STRING
269 269
270%type <y_sym> func_decl 270%type <y_sym> func_decl
271%type <y_sym> notype_decl 271%type <y_sym> notype_decl
272%type <y_sym> type_decl 272%type <y_sym> type_decl
273%type <y_type> typespec 273%type <y_type> typespec
274%type <y_type> clrtyp_typespec 274%type <y_type> clrtyp_typespec
275%type <y_type> notype_typespec 275%type <y_type> notype_typespec