[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison-3.1.91 released [beta]
From: |
Akim Demaille |
Subject: |
Re: bison-3.1.91 released [beta] |
Date: |
Tue, 23 Oct 2018 17:21:34 +0200 |
> Le 22 oct. 2018 à 18:09, Akim Demaille <address@hidden> a écrit :
>
> commit fe1cdd8d0cdedf99d344d8010c5c3989a166e96f
> Author: Akim Demaille <address@hidden>
> Date: Mon Oct 22 08:22:53 2018 +0200
>
> build: enable more warnings during tests
>
> Prompted by Derek Clegg.
> http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00018.html
>
> * configure.ac: here.
I need to install this to pacify ICC.
commit ab3dc5415c8b3a6a55fe95dd283cdbd013d55ee1
Author: Akim Demaille <address@hidden>
Date: Tue Oct 23 06:44:48 2018 +0200
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.
diff --git a/data/glr.c b/data/glr.c
index c185a4bc..56788b80 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -293,6 +293,7 @@ static YYLTYPE yyloc_default][]b4_yyloc_default;])[
# define yytrue true
# define yyfalse false
#else
+ /* When we move to stdbool, get rid of the various casts to yybool. */
typedef unsigned char yybool;
# define yytrue 1
# define yyfalse 0
@@ -783,7 +784,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem*
yyvsp,
yyGLRStack* yystackp,
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;
]b4_parse_param_use([yyvalp], [yylocp])dnl
[ YYUSE (yyrhslen);
@@ -903,7 +904,7 @@ yylhsNonterm (yyRuleNum yyrule)
static inline yybool
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. */
@@ -929,7 +930,7 @@ yygetLRActions (yyStateNum yystate, int yytoken,
int* yyaction, const short** yyconflicts)
{
int yyindex = yypact[yystate] + yytoken;
- if (yypact_value_is_default (yypact[yystate])
+ if (yyisDefaultedState (yystate)
|| yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
{
*yyaction = -yydefact[yystate];
@@ -964,13 +965,13 @@ yyLRgotoState (yyStateNum yystate, yySymbol yysym)
static inline yybool
yyisShiftAction (int yyaction)
{
- return 0 < yyaction;
+ return (yybool) (0 < yyaction);
}
static inline yybool
yyisErrorAction (int yyaction)
{
- return yyaction == 0;
+ return (yybool) (yyaction == 0);
}
/* GLRStates */
@@ -2354,7 +2355,7 @@ b4_dollar_popdef])[]dnl
size_t yys;
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:
diff --git a/data/yacc.c b/data/yacc.c
index 4f044a3c..03adcffd 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -974,9 +974,10 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
{
const int yylhs = yyr1[yyrule] - YYNTOKENS;
const int yyi = yypgoto[yylhs] + *yyesp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
+ yystate = ((yytype_int16)
+ (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]));
}
if (yyesp == yyes_prev)
{
@@ -996,7 +997,7 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
}
*++yyesp = yystate;
}
- YYDPRINTF ((stderr, " G%d", yystate));
+ YYDPRINTF ((stderr, " G%hd", yystate));
}
}
}]])[
- bison-3.1.90 released [beta], Akim Demaille, 2018/10/17
- Re: bison-3.1.91 released [beta], Akim Demaille, 2018/10/18
- Re: bison-3.1.91 released [beta], Derek Clegg, 2018/10/21
- Re: bison-3.1.91 released [beta], Derek Clegg, 2018/10/21
- Re: bison-3.1.91 released [beta], Akim Demaille, 2018/10/22
- Re: bison-3.1.91 released [beta],
Akim Demaille <=
- Re: bison-3.1.91 released [beta], Akim Demaille, 2018/10/23
- Re: bison-3.1.91 released [beta], Paul Eggert, 2018/10/23
- Re: bison-3.1.91 released [beta], Akim Demaille, 2018/10/24
- Re: bison-3.1.91 released [beta], Akim Demaille, 2018/10/24