Use noyywrap option in lex files.
authorDilan Palauzov <dilyan.palauzov@aegee.org>
Wed, 4 Jan 2017 16:05:22 +0000 (16:05 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 4 Jan 2017 16:05:22 +0000 (16:05 +0000)
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.

binutils/ChangeLog
binutils/syslex.l
ld/ChangeLog
ld/ldlex.h
ld/ldlex.l

index 6a61d61fee1bf2809d6731be3394909dd7b3ee32..d504ff14b191a6b8932d9518b8d726f7cc0dff7e 100644 (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>
 
        Update year range in copyright notice of all files.
index 86cb17de918e01b89c693dff1459808e1029f701..7fcc714fc0884473d0e40af26b96ee4eca964af4 100644 (file)
@@ -1,4 +1,4 @@
-%option noinput nounput
+%option noinput nounput noyywrap
 
 %{
 /* Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #define YY_NO_UNPUT
 #endif
 
-#ifndef yywrap
-static int yywrap (void) { return 1; }
-#endif
-
 extern int yylex (void);
 %}
 %%
index b855c74021fd8bb5c942c88bb893322472b1c72c..1ea2cb01402b35452acc92af2b51dde35fefe39e 100644 (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>
 
        * testsuite/ld-elf/audit.exp: Check for shared lib support.
index 3ecac2bc865e9246fca906a80449dee8d6dd0d9b..dac152b12d85948e356f8a310a635ff24026ece0 100644 (file)
@@ -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
index bddaaf812cc95c178d8817ed388255f45e4c1004..fa9b92442617c8eae4eaeb0ab34e570ff9b3c484 100644 (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; }
 
-/* Some versions of flex want this.  */
-#ifndef yywrap
-int yywrap (void) { return 1; }
-#endif
 %}
 
 %a 4000
This page took 0.039606 seconds and 4 git commands to generate.