diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l index 3b41bfc..5e62bc0 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -39,7 +39,7 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; +YYLTYPE yylloc ; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ #define YY_USER_ACTION \ diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped index 2d30f41..e073c9b 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -637,7 +637,9 @@ char *yytext; #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; +#if (__GNUC__ << 16) + __GNUC_MINOR__ < 0x1000000 +extern YYLTYPE yylloc ; +#endif /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ #define YY_USER_ACTION \ diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped index c8769d5..f7fbb2e 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -70,7 +70,7 @@ #include "dtc.h" #include "srcpos.h" -YYLTYPE yylloc; +YYLTYPE yylloc ; extern int yylex(void); extern void print_error(char const *fmt, ...); diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y index f412460..e00a3c4 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -24,7 +24,7 @@ #include "dtc.h" #include "srcpos.h" -YYLTYPE yylloc; +YYLTYPE yylloc ; extern int yylex(void); extern void print_error(char const *fmt, ...);