Use noyywrap option in lex files.

ld	PR 20958
	* ldlex.l (option): Add noyywrap
	(yywrap): Delete.
	* ldlex.h (yywrap): Delete prototype.

binutils
	PR 20958
	* syslex.l (option): Add noyywrap
	(yywrap): Delete.
This commit is contained in:
Dilan Palauzov 2017-01-04 16:05:22 +00:00 committed by Nick Clifton
parent 8cf50cb070
commit b055631694
5 changed files with 15 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2017-01-04 Dilan Palauzov <dilyan.palauzov@aegee.org>
PR 20958
* syslex.l (option): Add noyywrap
(yywrap): Delete.
2017-01-02 Alan Modra <amodra@gmail.com> 2017-01-02 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files. Update year range in copyright notice of all files.

View File

@ -1,4 +1,4 @@
%option noinput nounput %option noinput nounput noyywrap
%{ %{
/* Copyright (C) 2001-2017 Free Software Foundation, Inc. /* Copyright (C) 2001-2017 Free Software Foundation, Inc.
@ -36,10 +36,6 @@
#define YY_NO_UNPUT #define YY_NO_UNPUT
#endif #endif
#ifndef yywrap
static int yywrap (void) { return 1; }
#endif
extern int yylex (void); extern int yylex (void);
%} %}
%% %%

View File

@ -1,3 +1,10 @@
2017-01-04 Dilan Palauzov <dilyan.palauzov@aegee.org>
PR 20958
* ldlex.l (option): Add noyywrap
(yywrap): Delete.
* ldlex.h (yywrap): Delete prototype.
2017-01-04 Alan Modra <amodra@gmail.com> 2017-01-04 Alan Modra <amodra@gmail.com>
* testsuite/ld-elf/audit.exp: Check for shared lib support. * testsuite/ld-elf/audit.exp: Check for shared lib support.

View File

@ -182,9 +182,6 @@ extern const char* ldlex_filename (void);
/* In lexsup.c. */ /* In lexsup.c. */
extern int lex_input (void); extern int lex_input (void);
extern void lex_unput (int); extern void lex_unput (int);
#ifndef yywrap
extern int yywrap (void);
#endif
extern void parse_args (unsigned, char **); extern void parse_args (unsigned, char **);
#endif #endif

View File

@ -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; } #define RTOKEN(x) { yylval.token = x; return x; }
/* Some versions of flex want this. */
#ifndef yywrap
int yywrap (void) { return 1; }
#endif
%} %}
%a 4000 %a 4000