From patchwork Fri May 3 19:46:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32507 Received: (qmail 113351 invoked by alias); 3 May 2019 19:46:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 113295 invoked by uid 89); 3 May 2019 19:46:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1523, 897, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 May 2019 19:46:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9D119117610; Fri, 3 May 2019 15:46:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1WOKl+3OsRi8; Fri, 3 May 2019 15:46:12 -0400 (EDT) Received: from murgatroyd.Home (97-122-168-123.hlrn.qwest.net [97.122.168.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 46AF411760C; Fri, 3 May 2019 15:46:12 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Dilyan Palauzov Subject: [PATCH] Add noyywrap to ada-lex.l Date: Fri, 3 May 2019 13:46:09 -0600 Message-Id: <20190503194609.27403-1-tromey@adacore.com> MIME-Version: 1.0 From: Dilyan Palauzov This patch comes from PR ada/21406. It adds the noyywrap option to ada-lex.l. This was already done (by the same author) for other .l files in the binutils-gdb tree, so it seems reasonably safe. Tested on x86-64 Fedora 29. gdb/ChangeLog 2019-05-03 Dilyan Palauzov PR ada/21406: * ada-exp.y (yywrap): Don't define. * ada-lex.l (%option): Add noyywrap (yywrap): Remove. --- gdb/ChangeLog | 7 +++++++ gdb/ada-exp.y | 1 - gdb/ada-lex.l | 8 +------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index efad85b19ad..eb71f124848 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -717,7 +717,6 @@ primary : '*' primary %prec '.' #define yy_switch_to_buffer ada_yy_switch_to_buffer #define yyrestart ada_yyrestart #define yytext ada_yytext -#define yywrap ada_yywrap static struct obstack temp_parse_space; diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index f7fac27410e..8ce7c3a99a9 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -89,7 +89,7 @@ static int paren_depth; %} -%option case-insensitive interactive nodefault +%option case-insensitive interactive nodefault noyywrap %s BEFORE_QUAL_QUOTE @@ -634,12 +634,6 @@ rewind_to_char (int ch) yyrestart (NULL); } -int -yywrap(void) -{ - return 1; -} - /* Dummy definition to suppress warnings about unused static definitions. */ typedef void (*dummy_function) (); dummy_function ada_flex_use[] =