mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
(_AT_DATA_DANCER_Y): Declare yylex to take
(void) as arg when not pure, since we now assume C89 when building Bison. Pacify GCC by using parameter.
This commit is contained in:
@@ -675,11 +675,10 @@ AT_CLEANUP
|
|||||||
m4_define([_AT_DATA_DANCER_Y],
|
m4_define([_AT_DATA_DANCER_Y],
|
||||||
[AT_DATA_GRAMMAR([dancer.y],
|
[AT_DATA_GRAMMAR([dancer.y],
|
||||||
[%{
|
[%{
|
||||||
AT_LALR1_CC_IF(
|
static int yylex (AT_LALR1_CC_IF([int *], [void]));
|
||||||
[static int yylex (int *lval);],
|
AT_LALR1_CC_IF([],
|
||||||
[#include <stdio.h>
|
[#include <stdio.h>
|
||||||
static void yyerror (const char *s);
|
static void yyerror (const char *);])
|
||||||
static int yylex ();])
|
|
||||||
%}
|
%}
|
||||||
$1
|
$1
|
||||||
%token ARROW INVALID NUMBER STRING DATA
|
%token ARROW INVALID NUMBER STRING DATA
|
||||||
@@ -753,13 +752,14 @@ yyerror (const char *s)
|
|||||||
}])
|
}])
|
||||||
|
|
||||||
static int
|
static int
|
||||||
yylex (AT_LALR1_CC_IF([int *lval]))
|
yylex (AT_LALR1_CC_IF([int *lval], [void]))
|
||||||
[{
|
[{
|
||||||
static int toknum = 0;
|
static int toknum = 0;
|
||||||
int tokens[] =
|
int tokens[] =
|
||||||
{
|
{
|
||||||
':', -1
|
':', -1
|
||||||
};
|
};
|
||||||
|
]AT_LALR1_CC_IF([*lval = 0; /* Pacify GCC. */])[
|
||||||
return tokens[toknum++];
|
return tokens[toknum++];
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user