From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from anamika.lostca.se (anamika.lostca.se [IPv6:2a01:4f9:3b:505c::2]) by sourceware.org (Postfix) with ESMTPS id 266A8385841C for ; Thu, 23 Dec 2021 12:55:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 266A8385841C Received: from localhost (mail.lostca.se [65.21.75.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: spectre) by anamika.lostca.se (Postfix) with ESMTPSA id 98CD925BE4 for ; Thu, 23 Dec 2021 12:55:05 +0000 (UTC) Date: Thu, 23 Dec 2021 12:55:05 +0000 From: arjun.is@lostca.se To: libc-stable@sourceware.org Subject: [COMMITTED 2.34] intl/plural.y: Avoid conflicting declarations of yyerror and yylex Message-ID: <20211223125505.GA12122@lostca.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2021 12:55:08 -0000 bison-3.8 includes these lines in the generated intl/plural.c: #if !defined __gettexterror && !defined YYERROR_IS_DECLARED void __gettexterror (struct parse_args *arg, const char *msg); #endif #if !defined __gettextlex && !defined YYLEX_IS_DECLARED int __gettextlex (YYSTYPE *yylvalp, struct parse_args *arg); #endif Those default prototypes provided by bison conflict with the declarations later on in plural.y. This patch solves the issue. Reviewed-by: Arjun Shankar (cherry picked from commit c6d7d6312c21bbcfb236d48bb7c11cedb234389f) --- intl/plural.y | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/intl/plural.y b/intl/plural.y index e02e74541c..2ee128ba01 100644 --- a/intl/plural.y +++ b/intl/plural.y @@ -40,6 +40,11 @@ # define __gettextparse PLURAL_PARSE #endif +/* Later we provide those prototypes. Without these macros, bison may + generate its own prototypes with possible conflicts. */ +#define YYLEX_IS_DECLARED +#define YYERROR_IS_DECLARED + %} %parse-param {struct parse_args *arg} %lex-param {struct parse_args *arg} -- 2.31.1