From patchwork Sun Jan 6 19:56:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Richard G." X-Patchwork-Id: 209797 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3F3B72C0080 for ; Mon, 7 Jan 2013 06:56:44 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1358107005; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-Id:From:To:Cc:MIME-Version: Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:Date:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=u/yJx6R T+9Hnj0KAmVk/RIMLFq8=; b=Pmg+8zL8pZfG4hNdw+tF6YFK4m94Dr/a0EbsIe0 a8yEDTiedLwQmPtxwNT4VGm4ctDVO6Yek3HOWvGwm1h7O/AgJ8RtvLlLt/gHf7Ju TwePXFC9Rir7BA3UVkiEaU2+7FvJNvGnISdTh3ZPaLLnMA5y54VcSta7XXj91lxg nW3Q= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-Id:From:To:Cc:MIME-Version:Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:Date:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=AZ7NnsjtrduqDa6IaHKEby3IZYLaudH1W5ezKTQLKpCxJj70r3PmwqEay4qCWm 3dyF2+1Mtxt72JbWiFwQoQIdIu+GfVfEiQxbzQAQnjlS7ZnMmFBbOeiL4g6aFJM6 PagYl25lo1kPNZKE9t5R18by4a3yMcMG1KkkIansCtZjE=; Received: (qmail 14206 invoked by alias); 6 Jan 2013 19:56:41 -0000 Received: (qmail 14194 invoked by uid 22791); 6 Jan 2013 19:56:40 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from out5-smtp.messagingengine.com (HELO out5-smtp.messagingengine.com) (66.111.4.29) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Jan 2013 19:56:34 +0000 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 48C8B2099B; Sun, 6 Jan 2013 14:56:33 -0500 (EST) Received: from web6.nyi.mail.srv.osa ([10.202.2.216]) by compute5.internal (MEProxy); Sun, 06 Jan 2013 14:56:33 -0500 Received: by web6.nyi.mail.srv.osa (Postfix, from userid 99) id 0C91E20FC7; Sun, 6 Jan 2013 14:56:33 -0500 (EST) Message-Id: <1357502192.20273.140661174132361.1ECA78EE@webmail.messagingengine.com> From: "Daniel Richard G." To: Andreas Schwab Cc: gcc-patches@gcc.gnu.org, John David Anglin MIME-Version: 1.0 In-Reply-To: References: <1357490975.23068.140661174083089.5B023E3C@webmail.messagingengine.com> Subject: Re: [Bug bootstrap/53607] opt-functions.awk --> "awk: There is a regular expression error." Date: Sun, 06 Jan 2013 14:56:32 -0500 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sun, 2013 Jan 6 18:45+0100, Andreas Schwab wrote: > > > sub(".* " name "\\(", "", flags) > > - if (flags ~ "^{") > > + if (flags ~ "^\{") > > { > > - sub ("^{", "", flags) > > + sub ("^\{", "", flags) > > sub("}\\).*", "", flags) > > You need to escape the backslash inside a string. Revised patch attached; awk behavior/output is same as before. --Daniel Index: gcc/opt-functions.awk =================================================================== --- gcc/opt-functions.awk (revision 194916) +++ gcc/opt-functions.awk (working copy) @@ -62,9 +62,9 @@ if (flags !~ " " name "\\(") return "" sub(".* " name "\\(", "", flags) - if (flags ~ "^{") + if (flags ~ "^\\{") { - sub ("^{", "", flags) + sub ("^\\{", "", flags) sub("}\\).*", "", flags) } else