Add casts to short in yyparse.cpp, to avoid -Wnarrowing warnings. GCC 6.x will treat these as errors, so this needed to be fixed. It's probably better to regenerate the parser from the .y files in src/parser, but I'm told those specifically require MKS Toolkit lex & yacc, and don't work with GNU Flex/Bison. So I suspect that's going to be a longer-term project.

This commit is contained in:
Brian Cox 2016-04-18 15:46:27 -07:00
parent a9207128e2
commit 00fb3538ab
1 changed files with 20 additions and 20 deletions

View File

@ -176,25 +176,25 @@ yyNamedType yyTokenTypes[] = {
#endif
static short yydef[] = {
65535, 65531, 9, 53, 65527, 3, 65523, 10, 7, 65519,
5, 4, 65515, 50, 65509, 8, 65505, -35
(short)65535, (short)65531, 9, 53, (short)65527, 3, (short)65523, 10, 7, (short)65519,
5, 4, (short)65515, 50, (short)65509, 8, (short)65505, -35
};
static short yyex[] = {
0, 52, 65535, 1, 288, 18, 65535, 13, 0, 0,
65535, 1, 259, 49, 65535, 1, 262, 6, 65535, 1,
275, 52, 276, 52, 65535, 1, 276, 51, 65535, 1,
264, 52, 65535, 1, 276, 52, 65535, 1
0, 52, (short)65535, 1, 288, 18, (short)65535, 13, 0, 0,
(short)65535, 1, 259, 49, (short)65535, 1, 262, 6, (short)65535, 1,
275, 52, 276, 52, (short)65535, 1, 276, 51, (short)65535, 1,
264, 52, (short)65535, 1, 276, 52, (short)65535, 1
};
static short yyact[] = {
65499, 65534, 65455, 65490, 65491, 65497, 65498, 65495, 65496, 65489,
(short)65499, (short)65534, (short)65455, (short)65490, (short)65491, (short)65497, (short)65498, (short)65495, (short)65496, (short)65489,
289, 278, 277, 274, 273, 268, 267, 262, 261, 258,
65487, 65503, 65490, 267, 266, 261, 65504, 258, 65487, 65490,
267, 261, 65505, 272, 65506, 288, 65507, 288, 65461, 262,
65460, 262, 65459, 262, 65482, 261, 65489, 289, 65511, 284,
65512, 288, 65522, 257, 65513, 259, 65479, 259, 65514, 258,
65462, 263, 65470, 275, 65474, 259, 65464, 276, 65463, 264, -1
(short)65487, (short)65503, (short)65490, 267, 266, 261, (short)65504, 258, (short)65487, (short)65490,
267, 261, (short)65505, 272, (short)65506, 288, (short)65507, 288, (short)65461, 262,
(short)65460, 262, (short)65459, 262, (short)65482, 261, (short)65489, 289, (short)65511, 284,
(short)65512, 288, (short)65522, 257, (short)65513, 259, (short)65479, 259, (short)65514, 258,
(short)65462, 263, (short)65470, 275, (short)65474, 259, (short)65464, 276, (short)65463, 264, -1
};
static short yypact[] = {
@ -206,15 +206,15 @@ static short yypact[] = {
};
static short yygo[] = {
65471, 65476, 65477, 13, 65529, 65515, 65509, 21, 65473, 65472,
65492, 44, 65508, 65478, 65483, 65483, 65483, 65483, 65480, 65483,
65480, 65481, 65480, 65481, 65465, 65466, 65467, 65484, 40, 39,
(short)65471, (short)65476, (short)65477, 13, (short)65529, (short)65515, (short)65509, 21, (short)65473, (short)65472,
(short)65492, 44, (short)65508, (short)65478, (short)65483, (short)65483, (short)65483, (short)65483, (short)65480, (short)65483,
(short)65480, (short)65481, (short)65480, (short)65481, (short)65465, (short)65466, (short)65467, (short)65484, 40, 39,
38, 37, 36, 24, 21, 15, 13, 11, 8, 7,
2, 65520, 65524, 65527, 65528, 65533, 32, 30, 28, 23,
65525, 65488, 65510, 65494, 31, 65485, 65486, 65493, 29, 10,
65468, 65469, 24, 65530, 65526, 65531, 65521, 65517, 65452, 65458,
17, 16, 12, 65532, 65457, 65456, 3, 65502, 65501, 65500,
65454, 65453, 65519, 65523, 65516, 65518, 65475, -1
2, (short)65520, (short)65524, (short)65527, (short)65528, (short)65533, 32, 30, 28, 23,
(short)65525, (short)65488, (short)65510, (short)65494, 31, (short)65485, (short)65486, (short)65493, 29, 10,
(short)65468, (short)65469, 24, (short)65530, (short)65526, (short)65531, (short)65521, (short)65517, (short)65452, (short)65458,
17, 16, 12, (short)65532, (short)65457, (short)65456, 3, (short)65502, (short)65501, (short)65500,
(short)65454, (short)65453, (short)65519, (short)65523, (short)65516, (short)65518, (short)65475, -1
};
static short yypgo[] = {