This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Use noyywrap option in lex files.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 4 Jan 2017 16:06:16 -0000
- Subject: [binutils-gdb] Use noyywrap option in lex files.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b055631694967585d0c898ac493e1faa3d5e8ee6
commit b055631694967585d0c898ac493e1faa3d5e8ee6
Author: Dilan Palauzov <dilyan.palauzov@aegee.org>
Date: Wed Jan 4 16:05:22 2017 +0000
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.
Diff:
---
binutils/ChangeLog | 6 ++++++
binutils/syslex.l | 6 +-----
ld/ChangeLog | 7 +++++++
ld/ldlex.h | 3 ---
ld/ldlex.l | 6 +-----
5 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6a61d61..d504ff1 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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>
Update year range in copyright notice of all files.
diff --git a/binutils/syslex.l b/binutils/syslex.l
index 86cb17d..7fcc714 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/ld/ChangeLog b/ld/ChangeLog
index b855c74..1ea2cb0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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>
* testsuite/ld-elf/audit.exp: Check for shared lib support.
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 3ecac2b..dac152b 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -182,9 +182,6 @@ extern const char* ldlex_filename (void);
/* In lexsup.c. */
extern int lex_input (void);
extern void lex_unput (int);
-#ifndef yywrap
-extern int yywrap (void);
-#endif
extern void parse_args (unsigned, char **);
#endif
diff --git a/ld/ldlex.l b/ld/ldlex.l
index bddaaf8..fa9b924 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