mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
* data/c.m4 (b4_yy_symbol_print_generate):
(b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than 'const YYSTYPE', and similarly for YYLTYPE. This fixes one of the bugs reported today by Derek M Jones in <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>. * doc/bison.texinfo (Value Type): Document that YYSTYPE must be defined to be a type name without parens or brackets. (Location Type): Similarly for YYLTYPE. * tests/regression.at (Trivial grammars): Put in a test for this bug that will be caught by 'make maintainer-check' (though not, alas, by 'make check' unless your compiler is picky).
This commit is contained in:
@@ -483,8 +483,8 @@ m4_define_default([b4_yy_symbol_print_generate],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[const YYSTYPE * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[const YYLTYPE * const yylocationp], [yylocationp]]])[]dnl
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
if (!yyvaluep)
|
||||
@@ -515,8 +515,8 @@ b4_parse_param_use[]dnl
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[const YYSTYPE * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[const YYLTYPE * const yylocationp], [yylocationp]]])[]dnl
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
if (yytype < YYNTOKENS)
|
||||
|
||||
Reference in New Issue
Block a user