Project

General

Profile

Bug #12088

Updated by Andy Fiddaman almost 2 years ago

Since upgrading @bison@ from version 3.4.2 to version 3.5, @usr/src/cmd/acpi/iasl@ does not build: 

 <pre> 
 y.tab.c: In function 'yy_reduce_print': 
 y.tab.c:1029:30: error: array subscript has type 'char' [-Werror=char-subscripts] 
 y.tab.c: In function 'yysyntax_error': 
 y.tab.c:1207:23: error: array subscript has type 'char' [-Werror=char-subscripts] 
 y.tab.c: In function 'DtParserparse': 
 y.tab.c:1959:25: error: array subscript has type 'char' [-Werror=char-subscripts] 
 cc1: all warnings being treated as errors 
 </pre> 

 This is because some data types    have been changed in bison 3.5; here is what has changed that produces the first error in @yy_reduce_print()@ 

 Old generated code: 

 <pre> 
 typedef short yytype_int16; 

 static int 
 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 
 { 
     /* Reference*/    yystos[yyssp[x]] 
 </pre> 

 New generated code: 

 <pre> 
 typedef signed char yytype_int8; 
 typedef yytype_int8 yy_state_t; 

 static void yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) 
 { 
     /* Reference*/    yystos[yyssp[x]] 
 </pre> 

 This change came in with https://git.savannah.gnu.org/cgit/bison.git/commit/?id=67dcef357cd33fab4c11d51ccabc0c8aae4ae933 

Back