mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Merge branch 'maint'
* maint: use obstack_printf scanner: restore a missing start condition gnulib: update maint: post-release administrivia version 2.6.1 gnulib: update maint: fix some syntax-check issues tests: do not depend on __cplusplus to decide for C++ or C output Conflicts: NEWS bootstrap.conf cfg.mk lib/.gitignore
This commit is contained in:
@@ -1281,8 +1281,6 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
%debug
|
||||
%code requires
|
||||
{
|
||||
# include <stdio.h>
|
||||
|
||||
typedef struct sem_type
|
||||
{
|
||||
int ival;
|
||||
@@ -1291,20 +1289,21 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
|
||||
# define YYSTYPE sem_type
|
||||
|
||||
#ifdef __cplusplus
|
||||
]AT_SKEL_CC_IF([[
|
||||
# include <iostream>
|
||||
static void
|
||||
report (std::ostream& yyo, int ival, float fval)
|
||||
{
|
||||
yyo << "ival: " << ival << ", fval: " << fval;
|
||||
}
|
||||
#else
|
||||
]], [[
|
||||
# include <stdio.h>
|
||||
static void
|
||||
report (FILE* yyo, int ival, float fval)
|
||||
{
|
||||
fprintf (yyo, "ival: %d, fval: %1.1f", ival, fval);
|
||||
}
|
||||
#endif
|
||||
]])[
|
||||
}
|
||||
|
||||
%code
|
||||
|
||||
Reference in New Issue
Block a user