Project

General

Profile

Actions

Bug #12088

closed

Cannot build iasl with bison 3.5 [-Werror=char-subscripts]

Added by Andy Fiddaman almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

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

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

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:

typedef short yytype_int16;

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

New generated code:

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]]

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

Actions #2

Updated by Andy Fiddaman almost 2 years ago

  • Description updated (diff)
Actions #4

Updated by Andy Fiddaman almost 2 years ago

Tested by building illumos-gate on a system, in turn with bison 3.4 and 3.5

Actions #5

Updated by Electric Monk almost 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit d2dd27964b9dfc03118548f9509e4706787c2a69

commit  d2dd27964b9dfc03118548f9509e4706787c2a69
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2019-12-19T11:13:00.000Z

    12088 Cannot build iasl with bison 3.5 [-Werror=char-subscripts]
    Reviewed by: Jason King <jason.king@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF