public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Arjun Shankar <arjun@redhat.com>
To: Andrea Monaco <andrea.monaco@autistici.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] intl/plural.y: define macros to avoid multiple conflicting declarations of yyerror and yylex
Date: Wed, 22 Dec 2021 14:45:07 +0100	[thread overview]
Message-ID: <CAG_osaZVg12KRVK2=X7B5311mQCa74b5pbYyjdwQE=y4tB5bAg@mail.gmail.com> (raw)
In-Reply-To: <87lf0dy0n0.fsf@autistici.org>

Hi Andrea,

>   > I'm trying to reproduce this and have been unable to see these lines
>   > generated with bison-3.6.4, 3.7.6, and 3.8.2.
>
>
> Mine is gnu bison 3.8.  I got the same problem in binutils
> (https://lists.gnu.org/archive/html/bug-binutils/2021-11/msg00057.html)
> and it was replicated by a person, though we fixed it in a different way.

Thanks. I was able to reproduce it with bison-3.8. It looks like it
was a transient issue that occurred in bison-3.8 and was fixed by
bison-3.8.2.

This patch lets glibc successfully build with bison-3.8 installed and
is therefore useful.

diff --git a/intl/plural.y b/intl/plural.y
index e02e74541c..8573b56563 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}

OK. glibc uses double spaces at the end of a sentence in comments.
It's a minor edit and I'll make it before committing.

Reviewed-by: Arjun Shankar <arjun@redhat.com>


  reply	other threads:[~2021-12-22 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 23:54 Andrea Monaco
2021-12-22 13:45 ` Arjun Shankar [this message]
2021-12-22 15:07   ` Arjun Shankar
  -- strict thread matches above, loose matches on Subject: below --
2021-12-12  9:24 Andrea Monaco
2021-12-21 22:49 ` Arjun Shankar

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='CAG_osaZVg12KRVK2=X7B5311mQCa74b5pbYyjdwQE=y4tB5bAg@mail.gmail.com' \
    --to=arjun@redhat.com \
    --cc=andrea.monaco@autistici.org \
    --cc=libc-alpha@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: link
Be 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).