Author: mraudsepp
Date: 2008-11-12 18:04:15 +0100 (Wed, 12 Nov 2008)
New Revision: 1004

Modified:
   coreboot-v3/util/dtc/dtc-parser.y
Log:
Fix a build error when using bison-2.4

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 
?\226?\128?\152yyuserAction?\226?\128?\153:
/home/leio/dev/coreboot-v3/util/dtc/dtc-parser.y:154: error: expected 
?\226?\128?\152;?\226?\128?\153 before ?\226?\128?\152}?\226?\128?\153 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 
?\226?\128?\152yylex?\226?\128?\153:
/home/leio/dev/coreboot-v3/util/dtc/dtc-lexer.l:73: error: 
?\226?\128?\152yylval?\226?\128?\153 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 <[EMAIL PROTECTED]>
Acked-by: Carl-Daniel Hailfinger <[EMAIL PROTECTED]>

Modified: coreboot-v3/util/dtc/dtc-parser.y
===================================================================
--- coreboot-v3/util/dtc/dtc-parser.y   2008-11-12 16:57:33 UTC (rev 1003)
+++ coreboot-v3/util/dtc/dtc-parser.y   2008-11-12 17:04:15 UTC (rev 1004)
@@ -150,7 +150,7 @@
                                if ((namelen > 4) && (! 
strncmp(&name[namelen-4], ".dts", 4)))
                                        $6->label[namelen-4] = '\0';
 
-                               $$ = $6
+                               $$ = $6;
                        }
        |
        ;


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to