public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Richard G." <skunk@iSKUNK.ORG>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: gcc-patches@gcc.gnu.org, John David Anglin <danglin@gcc.gnu.org>
Subject: Re: [Bug bootstrap/53607] opt-functions.awk --> "awk: There is a regular expression error."
Date: Sun, 06 Jan 2013 19:56:00 -0000	[thread overview]
Message-ID: <1357502192.20273.140661174132361.1ECA78EE@webmail.messagingengine.com> (raw)
In-Reply-To: <m27gnq6w8u.fsf@igel.home>

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

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


-- 
Daniel Richard G. || skunk@iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pr53607-fix-2.patch --]
[-- Type: text/x-patch; name="pr53607-fix-2.patch", Size: 416 bytes --]

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

      reply	other threads:[~2013-01-06 19:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-53607-8784@http.gcc.gnu.org/bugzilla/>
     [not found] ` <bug-53607-8784-MBTnlKIggu@http.gcc.gnu.org/bugzilla/>
2013-01-06 16:49   ` Daniel Richard G.
2013-01-06 17:45     ` Andreas Schwab
2013-01-06 19:56       ` Daniel Richard G. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357502192.20273.140661174132361.1ECA78EE@webmail.messagingengine.com \
    --to=skunk@iskunk.org \
    --cc=danglin@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).