Module Name: src Committed By: rillig Date: Sat Jul 10 18:13:06 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: rename func_arg_list to align with C99 No functional change. To generate a diff of this commit: cvs rdiff -u -r1.297 -r1.298 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.297 src/usr.bin/xlint/lint1/cgram.y:1.298 --- src/usr.bin/xlint/lint1/cgram.y:1.297 Sat Jul 10 17:46:55 2021 +++ src/usr.bin/xlint/lint1/cgram.y Sat Jul 10 18:13:06 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.297 2021/07/10 17:46:55 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.298 2021/07/10 18:13:06 rillig 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.297 2021/07/10 17:46:55 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.298 2021/07/10 18:13:06 rillig Exp $"); #endif #include <limits.h> @@ -329,7 +329,7 @@ anonymize(sym_t *s) %type <y_tnode> gcc_statement_expr_item %type <y_tnode> term %type <y_tnode> generic_selection -%type <y_tnode> func_arg_list +%type <y_tnode> argument_expression_list %type <y_op> point_or_arrow %type <y_type> type_name %type <y_sym> abstract_declaration @@ -1731,7 +1731,7 @@ term: /* see C99 6.5.1 */ | term T_LPAREN T_RPAREN { $$ = new_function_call_node($1, NULL); } - | term T_LPAREN func_arg_list T_RPAREN { + | term T_LPAREN argument_expression_list T_RPAREN { $$ = new_function_call_node($1, $3); } | term point_or_arrow T_NAME { @@ -1824,6 +1824,15 @@ generic_association: /* C11 6.5.1.1 */ } ; +argument_expression_list: /* C99 6.5.2 */ + expr %prec T_COMMA { + $$ = new_function_argument_node(NULL, $1); + } + | argument_expression_list T_COMMA expr { + $$ = new_function_argument_node($1, $3); + } + ; + /* * The inner part of a GCC statement-expression of the form ({ ... }). * @@ -1880,15 +1889,6 @@ string2: } ; -func_arg_list: - expr %prec T_COMMA { - $$ = new_function_argument_node(NULL, $1); - } - | func_arg_list T_COMMA expr { - $$ = new_function_argument_node($1, $3); - } - ; - point_or_arrow: T_POINT { symtyp = FMEMBER;