I'm pretty sure this error comes from the use of bison 2.0 since a similar system that uses bison 1.875 works.
Compiling language.c y.tab.c:382: error: two or more data types in declaration of `yyss' y.tab.c:500: error: two or more data types in declaration of `yyprhs' y.tab.c:568: error: two or more data types in declaration of `yyrhs' y.tab.c:762: error: two or more data types in declaration of `yyrline' y.tab.c:919: error: two or more data types in declaration of `yyr1' y.tab.c:1057: error: two or more data types in declaration of `yydefact' [...more of the same...]
This in turn is caused by:
#define short int
The code contains statements such as:
short int yyss;
which of course gets turned into int int. The old version of bison generates code which uses "short" instead of "short int".
What is the correct solution? Remove the define or post-process the file, replacing "short int" with "int" using sed or similar?
On Wed, Jan 26, 2005 at 07:30:01PM +0100, David Hedbor @ Pike developers forum wrote:
I'm pretty sure this error comes from the use of bison 2.0 since a similar system that uses bison 1.875 works.
this sounds strangely familiar. which version of 1.875? marek had observed the same problem using 1.875d.
Here's the result of trying to compile 7.6.25 from CVS:
Compiling /tmp/buildd/pike7.6-7.6.25/src/language.c y.tab.c:384: error: two or more data types in declaration of `yyss' y.tab.c:921: error: two or more data types in declaration of `yyr1' y.tab.c:1059: error: two or more data types in declaration of `yydefact' y.tab.c:1157: error: two or more data types in declaration of `yydefgoto' y.tab.c:1184: error: two or more data types in declaration of `yypact' y.tab.c:1282: error: two or more data types in declaration of `yypgoto' y.tab.c:1311: error: two or more data types in declaration of `yytable' y.tab.c:2171: error: two or more data types in declaration of `yycheck' y.tab.c:3033: error: two or more data types in declaration of `yystos' y.tab.c: In function `yyparse': y.tab.c:3513: error: two or more data types in declaration of `yyssa' y.tab.c:3514: error: two or more data types in declaration of `yyss' y.tab.c:3515: error: two or more data types in declaration of `yyssp' y.tab.c:3606: error: two or more data types in declaration of `yyss1' y.tab.c:3608: error: two or more data types in declaration of `type name'
(bison 1.875d)
i have no idea what to make of that...
greetings, martin.
Works: bison (GNU Bison) 1.875 Copyright (C) 2002 Free Software Foundation, Inc.
Doesn't work: bison (GNU Bison) 2.0 Written by Robert Corbett and Richard Stallman.
One machine on which I have not tried a compile has: bison (GNU Bison) 1.875d Copyright (C) 2004 Free Software Foundation, Inc.
Which would indicate that 1.875d is a lot closer to 2.0 than 1.875.
pike-devel@lists.lysator.liu.se