public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug locale/28329] New: plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard
@ 2021-09-10  9:24 rudi at heitbaum dot com
  2021-09-10 10:54 ` [Bug locale/28329] " fweimer at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rudi at heitbaum dot com @ 2021-09-10  9:24 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28329

            Bug ID: 28329
           Summary: plural.y fails to compile correctly with Bison 3.8 -
                    yyerror: need to update to POSIX standard
           Product: glibc
           Version: 2.34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: locale
          Assignee: unassigned at sourceware dot org
          Reporter: rudi at heitbaum dot com
  Target Milestone: ---

Without the following patch or similar GNU Bison 3.8 fails to compile plural.c 

The documented fix from Bison NEWS is to #define yyerror yyerror. But in the
plural.c generated by plural.y, the defines are already included.

To comply with the latest POSIX standard, in Yacc compatibility mode
(options -y/--yacc) Bison now generates prototypes for yyerror and
yylex. In some situations, this is breaking compatibility: if the user
has already declared these functions but with some differences (e.g., to
declare them as static, or to use specific attributes), the generated
parser will fail to compile. To disable these prototypes, #define yyerror
(to yyerror), and likewise for yylex.

refer: https://git.savannah.gnu.org/cgit/bison.git/tree/NEWS

--- a/intl/plural.y     2021-09-10 18:28:49.067261327 +1000
+++ b/intl/plural.y     2021-09-10 18:29:14.597255037 +1000
@@ -54,8 +54,8 @@

 %{
 /* Prototypes for local functions.  */
-static int yylex (YYSTYPE *lval, struct parse_args *arg);
-static void yyerror (struct parse_args *arg, const char *str);
+int yylex (YYSTYPE *lval, struct parse_args *arg);
+void yyerror (struct parse_args *arg, const char *str);

 /* Allocation of expressions.  */

@@ -232,7 +232,7 @@
 }


-static int
+int
 yylex (YYSTYPE *lval, struct parse_args *arg)
 {
   const char *exp = arg->cp;
@@ -375,7 +375,7 @@
 }


-static void
+void
 yyerror (struct parse_args *arg, const char *str)
 {
   /* Do nothing.  We don't print error messages here.  */

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug locale/28329] plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard
  2021-09-10  9:24 [Bug locale/28329] New: plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard rudi at heitbaum dot com
@ 2021-09-10 10:54 ` fweimer at redhat dot com
  2021-09-10 11:31 ` [Bug build/28329] " rudi at heitbaum dot com
  2021-09-10 11:33 ` [Bug locale/28329] " fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2021-09-10 10:54 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28329

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |fweimer at redhat dot com
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-09-10

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
We run bison with:

BISONFLAGS = --yacc --name-prefix=__gettext --output

So these names do not end up in the generated source file, and the patch does
not introduce any linknamespace issues (basically, symbol collisions).

However, the comment about “local functions” is not correct. Would you please
fix this and post the patch to libc-alpha? Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug build/28329] plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard
  2021-09-10  9:24 [Bug locale/28329] New: plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard rudi at heitbaum dot com
  2021-09-10 10:54 ` [Bug locale/28329] " fweimer at redhat dot com
@ 2021-09-10 11:31 ` rudi at heitbaum dot com
  2021-09-10 11:33 ` [Bug locale/28329] " fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rudi at heitbaum dot com @ 2021-09-10 11:31 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28329

rudi at heitbaum dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|locale                      |build
                 CC|                            |carlos at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug locale/28329] plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard
  2021-09-10  9:24 [Bug locale/28329] New: plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard rudi at heitbaum dot com
  2021-09-10 10:54 ` [Bug locale/28329] " fweimer at redhat dot com
  2021-09-10 11:31 ` [Bug build/28329] " rudi at heitbaum dot com
@ 2021-09-10 11:33 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2021-09-10 11:33 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28329

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|build                       |locale

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-10 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  9:24 [Bug locale/28329] New: plural.y fails to compile correctly with Bison 3.8 - yyerror: need to update to POSIX standard rudi at heitbaum dot com
2021-09-10 10:54 ` [Bug locale/28329] " fweimer at redhat dot com
2021-09-10 11:31 ` [Bug build/28329] " rudi at heitbaum dot com
2021-09-10 11:33 ` [Bug locale/28329] " fweimer at redhat dot com

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).