From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35856 invoked by alias); 23 Jun 2015 16:09:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 35824 invoked by uid 89); 23 Jun 2015 16:09:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f44.google.com Received: from mail-oi0-f44.google.com (HELO mail-oi0-f44.google.com) (209.85.218.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 23 Jun 2015 16:09:01 +0000 Received: by oiax193 with SMTP id x193so10476961oia.2 for ; Tue, 23 Jun 2015 09:08:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kPEjOSdh9kITauYWLnAbRiGHcOtREcJVcT7CfQzh5Uo=; b=kaxtggT5psxv7qUiSOv+zEfgLs8U84jQXBCDqrPOKbdTsb3CRthlM/5+3dBJAC4EzM PGvcYsFkf6rbENRI0V3SR1rJqKTwQFKA7N5f08902hAgCKBn/+MRqMw4I3gI2jGtOLG8 OB2mcMNPsX82HFy+l/DiEviTZbCRdMqq8B5nFGUM0sE8cxWgDpDHU9QKZip6AnZfCOWy aORKlbdOUqbSeamADhUGwokyvOiMcTEzcQF1mDK2hDYeg1tPsUZcgyRX12KtUOHEka8a U/TYpXIUJi6s+o1R2zihsGIEZPI0kyJLOrVnFIv9UXHQSyXBHXXgbuSDkqktUmpBf5MP 4XGw== X-Gm-Message-State: ALoCoQkbeFAc87jtBN4TCq7eqhtYcc77LmIIvQIAO3QcGNAoTQjve1iXyPdISIlzAGB4dsy4WzAu MIME-Version: 1.0 X-Received: by 10.60.101.195 with SMTP id fi3mr30521768oeb.65.1435075739098; Tue, 23 Jun 2015 09:08:59 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Tue, 23 Jun 2015 09:08:58 -0700 (PDT) In-Reply-To: References: <1434775646-2625-1-git-send-email-martin.galvan@tallertechnologies.com> <86bng8rtva.fsf@gmail.com> Date: Tue, 23 Jun 2015 16:09:00 -0000 Message-ID: Subject: Re: [PING][PATCH] testsuite: Escape a loose '[' character inside a regexp. From: Doug Evans To: Yao Qi Cc: Martin Galvan , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00481.txt.bz2 On Tue, Jun 23, 2015 at 10:50 AM, Doug Evans wrote: > Here the inconsistency happens because it turns out that > in this context [ and \[ have the same effect. > [I added some printfs to gdb_test to find this out.] > > I think that's a bug but I don't know what would be involved > in fixing it. Actually, this is arguably s.o.p. Bleah. Otherwise \r\n inside {} won't get expanded as CR,LF. E.g. compare set foo {a\r\nb} vs set foo "a\r\nb" That \[ gets expanded as [ is no different than \z getting expanded as z. % set foo "a\zb\[c" azb[c % Still a bit confusing since \[ vs [ different in most contexts in Tcl. So I'd still advocate for a comment.