bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bison 3.6.1 generates (internal) tokentype and (yyerror) function with s


From: Chuan-kai Lin
Subject: Bison 3.6.1 generates (internal) tokentype and (yyerror) function with same name: <filename>_error
Date: Thu, 14 May 2020 09:47:46 -0700

Hi Akim,

I am forwarding a bug report that the libexplain and the fhist Debian
packages fail to build with Bison 3.6.1.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960608
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libexplain.html

I have also attached the build log with this email.  Can you look into
this issue and see if it is a bug in Bison?  Thanks!

Here is the explanation from Andreas Beckmann, who reported the bug:

At least two packages FTBFS with the latest bison with some yyerror related
error message. I had a short look into the libexplain failure and found the
following:

In libexplain/acl_grammar.yacc.c (generated from libexplain/acl_grammar.y),
these bits are new in 3.6.1 (they were not generated by 3.5.3):

...
  enum acl_grammar_tokentype
  {
    acl_grammar_EMPTY = -2,
    acl_grammar_EOF = 0,                     /* "end of file"  */
    acl_grammar_error = 256,                 /* error  */
    acl_grammar_UNDEF = 257,                 /* "invalid token"  */
...
  };
...
#define acl_grammar_EOF 0
#define acl_grammar_error 256
#define acl_grammar_UNDEF 257
...

and acl_grammar_error clashes with the existing (generated by 3.6.1 and
3.5.3, in acl_grammar.y this is yyerror())

...
static void
acl_grammar_error(const char *text)
{
...
}

which causes this error during compilation:

y.tab.c:152:27: error: expected identifier or '(' before numeric constant
libexplain/acl_grammar.y:128:1: note: in expansion of macro 'acl_grammar_error'
  128 | yyerror(const char *text)
      | ^~~~~~~~~~~~~~~~~
libexplain/acl_grammar.y: In function 'acl_grammar_errorf':
y.tab.c:152:27: error: called object is not a function or function pointer
libexplain/acl_grammar.y:155:5: note: in expansion of macro 'acl_grammar_error'
  155 |     yyerror(buf);
      |     ^~~~~~~~~~~~~
libexplain/acl_grammar.y: In function 'acl_grammar_parse':
y.tab.c:152:27: error: called object is not a function or function pointer
libexplain/acl_grammar.y:470:13: note: in expansion of macro 'acl_grammar_error'
  470 |             yyerror
      |             ^~~~~~~
y.tab.c:152:27: error: called object is not a function or function pointer
y.tab.c:1720:7: note: in expansion of macro 'acl_grammar_error'
y.tab.c:152:27: error: called object is not a function or function pointer
y.tab.c:1831:3: note: in expansion of macro 'acl_grammar_error'
At top level:
libexplain/acl_grammar.y:105:1: warning: 'result_append' defined but
not used [-Wunused-function]
  105 | result_append(const char *text)
      | ^~~~~~~~~~~~~

This does not look like it is an error in libexplain.

Attachment: debian_rbuild_unstable_amd64_libexplain_1.4.D001-9.rbuild.log.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]