hackt
hackt copied to clipboard
parser-generated *-parse.cc: yyssp declaration inconsistent with yystate
parser/hackt-parse.cc:2860:12: error: implicit conversion loses integer precision: 'int' to 'yytype_int16' (aka 'short') [-Werror,-Wconversion] *yyssp = yystate; ~ ^~~~~~~ ./parser/hackt-prefix.h:12:18: note: expanded from macro 'yystate'
define yystate hackt_state
^~~~~~~~~~~
parser/hackt-parse.cc:2865:25: warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion] YYSIZE_T yysize = yyssp - yyss + 1; ~~~~~~ ^~~~~~~~~~~~~~~~ ./parser/hackt-prefix.h:55:16: note: expanded from macro 'yyssp'
define yyssp hackt_ssp
^
This happens because yystate is declared an int by the parser skeleton (by bison), yet yyssp is declared as a short*. This triggers -Werror=conversion. Sloppy. Not sure if this can be fixed, responsibility belongs to bison, so should check with upstream.
Workaround is to append -Wno-error=conversion to CXXFLAGS during configure.