From: Bernhard Rosenkranzer Date: Wed, 18 Jan 2017 14:14:54 +0000 (+0000) Subject: Fix lex source files so that they will be accepted by flex v2.6.3 X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q1~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edb8325af76b5fc8b9397dad091433c51e77d08e;p=thirdparty%2Fbinutils-gdb.git Fix lex source files so that they will be accepted by flex v2.6.3 PR 21059 binutils* config/bfin-lex.l: Support processing with flex 2.6.3. * itbl-lex.l: Likewise. gas * arlex.l: Support processing with flex 2.6.3. * deflex.l: Likewise. * syslex.l: Likewise. ld * ldlex.l: Support processing with flex 2.6.3. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d4755bd6fba..3c4c220c063 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2017-01-18 Bernhard Rosenkranzer + + PR 21059 + * arlex.l: Support processing with flex 2.6.3. + * deflex.l: Likewise. + * syslex.l: Likewise. + 2017-01-12 Nick Clifton PR binutils/20876 diff --git a/binutils/arlex.l b/binutils/arlex.l index b5b12d1d881..43350df292d 100644 --- a/binutils/arlex.l +++ b/binutils/arlex.l @@ -1,4 +1,4 @@ -%option noinput nounput +%option noinput nounput noyywrap %{ /* arlex.l - Strange script language lexer */ @@ -88,7 +88,3 @@ int linenumber; "\n" { linenumber ++; return NEWLINE; } %% -#ifndef yywrap -/* Needed for lex, though not flex. */ -int yywrap(void) { return 1; } -#endif diff --git a/binutils/deflex.l b/binutils/deflex.l index de09b6157ef..24e974ca18c 100644 --- a/binutils/deflex.l +++ b/binutils/deflex.l @@ -1,4 +1,4 @@ -%option noinput nounput +%option noinput nounput noyywrap %{/* deflex.l - Lexer for .def files */ @@ -91,7 +91,3 @@ int linenumber; "@" { return '@';} "," { return ',';} %% -#ifndef yywrap -/* Needed for lex, though not flex. */ -int yywrap(void) { return 1; } -#endif diff --git a/binutils/syslex.l b/binutils/syslex.l index 86cb17de918..7fcc714fc08 100644 --- a/binutils/syslex.l +++ b/binutils/syslex.l @@ -1,4 +1,4 @@ -%option noinput nounput +%option noinput nounput noyywrap %{ /* Copyright (C) 2001-2017 Free Software Foundation, Inc. @@ -36,10 +36,6 @@ #define YY_NO_UNPUT #endif -#ifndef yywrap -static int yywrap (void) { return 1; } -#endif - extern int yylex (void); %} %% diff --git a/gas/ChangeLog b/gas/ChangeLog index 4069f545475..8f3cf3eb4fb 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2017-01-18 Bernhard Rosenkranzer + + PR 21059 + * config/bfin-lex.l: Support processing with flex 2.6.3. + * itbl-lex.l: Likewise. + 2017-01-12 Igor Tsimbalist * config/tc-i386.c (cpu_arch): Add .avx512_vpopcntdq. diff --git a/gas/config/bfin-lex.l b/gas/config/bfin-lex.l index 03a4ce875b7..f270a4b75cf 100644 --- a/gas/config/bfin-lex.l +++ b/gas/config/bfin-lex.l @@ -1,3 +1,5 @@ +%option noyywrap + /* bfin-lex.l ADI Blackfin lexer Copyright (C) 2005-2017 Free Software Foundation, Inc. @@ -545,12 +547,3 @@ set_start_state (void) { BEGIN KEYWORD; } - - -#ifndef yywrap -int -yywrap () -{ - return 1; -} -#endif diff --git a/gas/itbl-lex.l b/gas/itbl-lex.l index d9e243c8ab0..4a7c51214c4 100644 --- a/gas/itbl-lex.l +++ b/gas/itbl-lex.l @@ -1,3 +1,5 @@ +%option noyywrap + /* itbl-lex.l Copyright (C) 1997-2017 Free Software Foundation, Inc. @@ -102,11 +104,3 @@ HEX [0-9A-Fa-f] return yytext[0]; } %% - -#ifndef yywrap -int -yywrap () - { - return 1; - } -#endif diff --git a/ld/ChangeLog b/ld/ChangeLog index d08b8e09afe..479d6780a35 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2017-01-18 Bernhard Rosenkranzer + + PR 21059 + * ldlex.l: Support processing with flex 2.6.3. + 2017-01-13 H.J. Lu Backport from master diff --git a/ld/ldlex.l b/ld/ldlex.l index bddaaf812cc..fa9b9244261 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -1,4 +1,4 @@ -%option nounput +%option nounput noyywrap %{ @@ -86,10 +86,6 @@ static void lex_warn_invalid (char *where, char *what); */ #define RTOKEN(x) { yylval.token = x; return x; } -/* Some versions of flex want this. */ -#ifndef yywrap -int yywrap (void) { return 1; } -#endif %} %a 4000