From 705439d7aa685c36b2c05fdecc45d0e6b6926e0b Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Wed, 12 Nov 2008 17:04:15 +0000 Subject: [PATCH] Fix a build error when using bison-2.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes one of the errors from using bison-2.4, but there are more. This one in details is the following error: BISON build/util/dtc/dtc-parser.tab.c HOSTCC build/util/dtc/dtc-parser.tab.o /home/leio/dev/coreboot-v3/util/dtc/dtc-parser.y: In function ‘yyuserAction’: /home/leio/dev/coreboot-v3/util/dtc/dtc-parser.y:154: error: expected ‘;’ before ‘}’ token make: *** [/home/leio/dev/coreboot-v3/build/util/dtc/dtc-parser.tab.o] Error 1 Note that 2.4.1 might be made to still work without the semi-colon for some languages, but I understand 2.5 then still won't work without one. As it builds fine with this change with bison-2.3, it should be safe to just add the semicolon. The remaining error is the following: /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l: In function ‘yylex’: /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: ‘yylval’ undeclared (first use in this function) /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: (Each undeclared identifier is reported only once /home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: for each function it appears in.) dtc-parser.tab.h doesn't seem to get an "extern YYSTYPE yylval" declaration, which per documentation should only happen for pure parser cases ("%define api.pure"), but I can't find any such declaration in dtc to cause the problem. Note that upstream dtc builds fine with bison-2.4 Signed-off-by: Mart Raudsepp Acked-by: Carl-Daniel Hailfinger git-svn-id: svn://coreboot.org/repository/coreboot-v3@1004 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- util/dtc/dtc-parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/dtc/dtc-parser.y b/util/dtc/dtc-parser.y index 0ed970d2a0..f1500065b9 100644 --- a/util/dtc/dtc-parser.y +++ b/util/dtc/dtc-parser.y @@ -150,7 +150,7 @@ config: DT_CONFIG '(' if ((namelen > 4) && (! strncmp(&name[namelen-4], ".dts", 4))) $6->label[namelen-4] = '\0'; - $$ = $6 + $$ = $6; } | ;