Bison 3.0 updates - Mailing list pgsql-hackers

From Tom Lane
Subject Bison 3.0 updates
Date
Msg-id 7367.1375074342@sss.pgh.pa.us
Whole thread Raw
Responses Re: Bison 3.0 updates
Re: Bison 3.0 updates
Re: Bison 3.0 updates
List pgsql-hackers
Buildfarm member anchovy has been failing for the last couple of days,
evidently because its owner just couldn't wait to adopt bison 3.0,
which is all of 3 days old.  The failures look like

cubeparse.y:42.1-13: warning: deprecated directive, use '%name-prefix' [-Wdeprecated]
 %name-prefix="cube_yy"
 ^^^^^^^^^^^^^

(which looks like 3.0 isn't actually ready for prime time, but at least
it's only a warning)

cubeparse.c:163:5: error: conflicting types for 'cube_yyparse'
 int cube_yyparse (void);
     ^
cubeparse.y:32:5: note: previous declaration of 'cube_yyparse' was here
 int cube_yyparse(void *result);
     ^

A look in the Bison release notes explains this one: they stopped
supporting YYPARSE_PARAM, which contrib/cube and contrib/seg both use.
The recommended replacement is %parse-param, which is certainly a whole
lot cleaner: it lets you specify the datatype of the extra parser
parameter, instead of having it default to "void *".  This option also
changes the signature of yyerror(), but that's not a problem.

At first I thought this was going to make us go through a tool upgrade
exercise, because I couldn't find %parse-param in the documentation for
bison 1.875, which is our oldest supported version.  But further
research shows that %parse-param actually was introduced in 1.875,
they just forgot to document it :-(.

So I propose the attached patch, which I've verified still works with
1.875.  I don't plan to install 3.0 just to test this, but I assume it's
OK there.

I'm thinking we should apply this to all supported branches, in case
somebody gets the idea to build an older branch with bleeding-edge
tools.  Any objections?

            regards, tom lane


Attachment

pgsql-hackers by date:

Previous
From: Tom Dunstan
Date:
Subject: Evaluate arbitrary expression on tuple inside trigger function?
Next
From: Stephen Frost
Date:
Subject: Re: Bison 3.0 updates