* [COMMITTED 2.34] intl/plural.y: Avoid conflicting declarations of yyerror and yylex
@ 2021-12-23 12:55 arjun.is
0 siblings, 0 replies; only message in thread
From: arjun.is @ 2021-12-23 12:55 UTC (permalink / raw)
To: libc-stable
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>
(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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-23 12:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 12:55 [COMMITTED 2.34] intl/plural.y: Avoid conflicting declarations of yyerror and yylex arjun.is
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).