mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
pacify ICC 16.0.3 20160415
Found on the CI.
yacc.c:
error #2259: non-pointer conversion from "int" to "yytype_int16={short}" may lose significant bits
yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
^
glr.c:
error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
yybool yynormal YY_ATTRIBUTE_UNUSED = (yystackp->yysplitPoint == YY_NULLPTR);
^
error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
return yypact_value_is_default (yypact[yystate]);
^
error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
return 0 < yyaction;
^
error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
return yyaction == 0;
^
error #2259: non-pointer conversion from "int" to "yybool={unsigned char}" may lose significant bits
yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
^
* data/glr.c, data/yacc.c: Avoid these warnings.
This commit is contained in:
13
data/glr.c
13
data/glr.c
@@ -293,6 +293,7 @@ static YYLTYPE yyloc_default][]b4_yyloc_default;])[
|
|||||||
# define yytrue true
|
# define yytrue true
|
||||||
# define yyfalse false
|
# define yyfalse false
|
||||||
#else
|
#else
|
||||||
|
/* When we move to stdbool, get rid of the various casts to yybool. */
|
||||||
typedef unsigned char yybool;
|
typedef unsigned char yybool;
|
||||||
# define yytrue 1
|
# define yytrue 1
|
||||||
# define yyfalse 0
|
# define yyfalse 0
|
||||||
@@ -783,7 +784,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
|||||||
yyGLRStack* yystackp,
|
yyGLRStack* yystackp,
|
||||||
YYSTYPE* yyvalp]b4_locuser_formals[)
|
YYSTYPE* yyvalp]b4_locuser_formals[)
|
||||||
{
|
{
|
||||||
yybool yynormal YY_ATTRIBUTE_UNUSED = (yystackp->yysplitPoint == YY_NULLPTR);
|
yybool yynormal YY_ATTRIBUTE_UNUSED = (yybool) (yystackp->yysplitPoint == YY_NULLPTR);
|
||||||
int yylow;
|
int yylow;
|
||||||
]b4_parse_param_use([yyvalp], [yylocp])dnl
|
]b4_parse_param_use([yyvalp], [yylocp])dnl
|
||||||
[ YYUSE (yyrhslen);
|
[ YYUSE (yyrhslen);
|
||||||
@@ -903,7 +904,7 @@ yylhsNonterm (yyRuleNum yyrule)
|
|||||||
static inline yybool
|
static inline yybool
|
||||||
yyisDefaultedState (yyStateNum yystate)
|
yyisDefaultedState (yyStateNum yystate)
|
||||||
{
|
{
|
||||||
return yypact_value_is_default (yypact[yystate]);
|
return (yybool) yypact_value_is_default (yypact[yystate]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The default reduction for YYSTATE, assuming it has one. */
|
/** The default reduction for YYSTATE, assuming it has one. */
|
||||||
@@ -929,7 +930,7 @@ yygetLRActions (yyStateNum yystate, int yytoken,
|
|||||||
int* yyaction, const short** yyconflicts)
|
int* yyaction, const short** yyconflicts)
|
||||||
{
|
{
|
||||||
int yyindex = yypact[yystate] + yytoken;
|
int yyindex = yypact[yystate] + yytoken;
|
||||||
if (yypact_value_is_default (yypact[yystate])
|
if (yyisDefaultedState (yystate)
|
||||||
|| yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
|
|| yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
|
||||||
{
|
{
|
||||||
*yyaction = -yydefact[yystate];
|
*yyaction = -yydefact[yystate];
|
||||||
@@ -964,13 +965,13 @@ yyLRgotoState (yyStateNum yystate, yySymbol yysym)
|
|||||||
static inline yybool
|
static inline yybool
|
||||||
yyisShiftAction (int yyaction)
|
yyisShiftAction (int yyaction)
|
||||||
{
|
{
|
||||||
return 0 < yyaction;
|
return (yybool) (0 < yyaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline yybool
|
static inline yybool
|
||||||
yyisErrorAction (int yyaction)
|
yyisErrorAction (int yyaction)
|
||||||
{
|
{
|
||||||
return yyaction == 0;
|
return (yybool) (yyaction == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GLRStates */
|
/* GLRStates */
|
||||||
@@ -2354,7 +2355,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
size_t yys;
|
size_t yys;
|
||||||
|
|
||||||
for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
|
for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
|
||||||
yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
|
yystackp->yytops.yylookaheadNeeds[yys] = (yybool) (yychar != YYEMPTY);
|
||||||
|
|
||||||
/* yyprocessOneStack returns one of three things:
|
/* yyprocessOneStack returns one of three things:
|
||||||
|
|
||||||
|
|||||||
@@ -974,9 +974,10 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
|
|||||||
{
|
{
|
||||||
const int yylhs = yyr1[yyrule] - YYNTOKENS;
|
const int yylhs = yyr1[yyrule] - YYNTOKENS;
|
||||||
const int yyi = yypgoto[yylhs] + *yyesp;
|
const int yyi = yypgoto[yylhs] + *yyesp;
|
||||||
yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
|
yystate = ((yytype_int16)
|
||||||
? yytable[yyi]
|
(0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
|
||||||
: yydefgoto[yylhs]);
|
? yytable[yyi]
|
||||||
|
: yydefgoto[yylhs]));
|
||||||
}
|
}
|
||||||
if (yyesp == yyes_prev)
|
if (yyesp == yyes_prev)
|
||||||
{
|
{
|
||||||
@@ -996,7 +997,7 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
|
|||||||
}
|
}
|
||||||
*++yyesp = yystate;
|
*++yyesp = yystate;
|
||||||
}
|
}
|
||||||
YYDPRINTF ((stderr, " G%d", yystate));
|
YYDPRINTF ((stderr, " G%hd", yystate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]])[
|
}]])[
|
||||||
|
|||||||
Reference in New Issue
Block a user