On Thu, Mar 08, 2012 at 08:12:47AM -0000, Roger Ferrer Ibanez wrote: > When compiling a C (not C++) GLR grammar, Ubuntu's patched Bison 2.5 > generates an invalid file that cannot be compiled because yyerror is > called with more arguments than parameters. > > For instance, in my grammar the generated .c file contains two calls to > yyerror like this one > > yyerror (parsed_tree, "%s", yymsg); > > which is wrong since yyerror in my grammar only has two parameters: that > extra "%s" is amiss. > > Note that there are other calls to yyerror in the glr.c skeleton which > do not suffer from this problem. > > Upstream version 2.5 from GNU site works fine.
Yeah, this seems to deviate from the upstream documentation: http://www.gnu.org/software/bison/manual/html_node/Error-Reporting.html It's the implementations of yyerror that need to make sure they don't use a format literal. -Kees -- Kees Cook -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/949732 Title: use-format-literals.patch breaks compilation of glr grammars To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bison/+bug/949732/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
