public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Arjun Shankar <arjun@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] intl/plural.y: Avoid conflicting declarations of yyerror and yylex Date: Wed, 22 Dec 2021 14:02:30 +0000 (GMT) [thread overview] Message-ID: <20211222140230.400523858D35@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c6d7d6312c21bbcfb236d48bb7c11cedb234389f commit c6d7d6312c21bbcfb236d48bb7c11cedb234389f Author: Andrea Monaco <andrea.monaco@autistici.org> Date: Sun Dec 12 10:24:28 2021 +0100 intl/plural.y: Avoid conflicting declarations of yyerror and yylex 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 <arjun@redhat.com> Diff: --- 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}
reply other threads:[~2021-12-22 14:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211222140230.400523858D35@sourceware.org \ --to=arjun@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).