Bison 3.5 - y.tab.c generates compiler warnings

Andy Fiddaman <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
Hi all,

I have just updated Bison to version 3.5 for the OmniOS operating system,
an illumos distribution, and have found that building the ACPI iasl
utility generates new compiler warnings like this:

	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]

This is caused by the change of type for state numbers in this commit:

https://git.savannah.gnu.org/cgit/bison.git/commit/?id=67dcef357cd33fab4c11d51ccabc0c8aae4ae933

	/* On this platform */
	typedef unsigned char yytype_uint8;
	typedef yytype_uint8 yy_state_num;

As opposed to:

	yytype_int16

before.

I've patched the (iasl) Makefile to disable these compiler checks for the
generated files but wanted to report it here too.

Regards,

Andy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.