From patchwork Sat Apr 15 08:07:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 751009 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w4nFt3sYpz9s7j for ; Sat, 15 Apr 2017 18:08:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="OQ67l+YG"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=RWHgdaq3oqKL0J0EN CAw9qnggh1Gm50hhAwWvGWO22wJRHxnfIy0jiWDsAH+2CQ+4b2pcFKD15+fg4RRN J68piOxWmGHzgmeC0ZRcfgStWagP1/V0n3d7Nxk4HVQiSEvhwUug60hyPsU006r7 tm+OLVZF4gP0yoBeD+YvGZ/4wA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=qIxh5x3z7nSwO3p/q4KcT5W kG5k=; b=OQ67l+YG3BHyF5Koe8UJXKRUd4UwnXpNUGBQXFQCcy5YznBw02OyTK8 Ma0zJ8ZHEj2S48Rk6xkKR/WhYAlFNX23/ETk/MzAuAX801UIK9haGGhSFAc/6Uls 1YRs2J/2E044eA9XzmfFkOvDSiJoyw7AO+CETv8ltCQ3f1T3tmgs= Received: (qmail 47895 invoked by alias); 15 Apr 2017 08:07:50 -0000 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 Received: (qmail 47867 invoked by uid 89); 15 Apr 2017 08:07:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 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, URIBL_RED autolearn=ham version=3.3.2 spammy=ads, brace, adb X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Apr 2017 08:07:46 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1czIkB-0005yy-Mk from Tom_deVries@mentor.com ; Sat, 15 Apr 2017 01:07:44 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 15 Apr 2017 09:07:38 +0100 Subject: Re: [PATCH, testsuite] Allow braces around relative line numbers To: Jakub Jelinek References: <31cf86fd-eda4-e373-5263-a3b36854109e@mentor.com> <20170328222321.GE17461@tucnak> CC: Mike Stump , Rainer Orth , GCC Patches From: Tom de Vries Message-ID: <6515ea22-c85d-8de1-3224-fb996e729cee@mentor.com> Date: Sat, 15 Apr 2017 10:07:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170328222321.GE17461@tucnak> X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) On 03/29/2017 12:23 AM, Jakub Jelinek wrote: > On Tue, Mar 28, 2017 at 08:27:54AM +0200, Tom de Vries wrote: >> this patch fixes testsuite PR80220 - "relative line numbers don't work when >> put between braces". > > What is the advantage of putting the line numbers between braces? I don't know of any advantages. > Isn't it easier to just drop those? I've attached two patches: - first patch implements a script contrib/tests-normalize-line-number.sh that removes braces around line numbers. - second patch is the result of running the script. Tested by running the patched test-cases. Second patch OK for stage4/stage1 trunk? [ I'm not sure if the first patch is useful enough to commit to contrib. ] Thanks, - Tom Remove braces around line number in dejagnu directive 2017-04-14 Tom de Vries * g++.dg/parse/error11.C: Remove braces around line number in dejagnu directive. * g++.dg/parse/error3.C: Same. * g++.old-deja/g++.pt/niklas01a.C: Same. * gcc.dg/990506-0.c: Same. * gcc.dg/cpp/19990413-1.c: Same. * gcc.dg/cpp/pragma-1.c: Same. * gcc.dg/cpp/pragma-2.c: Same. * gcc.dg/m-un-2.c: Same. * objc.dg/private-1.m: Same. --- gcc/testsuite/g++.dg/parse/error11.C | 2 +- gcc/testsuite/g++.dg/parse/error3.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C | 2 +- gcc/testsuite/gcc.dg/990506-0.c | 4 ++-- gcc/testsuite/gcc.dg/cpp/19990413-1.c | 2 +- gcc/testsuite/gcc.dg/cpp/pragma-1.c | 4 ++-- gcc/testsuite/gcc.dg/cpp/pragma-2.c | 4 ++-- gcc/testsuite/gcc.dg/m-un-2.c | 4 ++-- gcc/testsuite/objc.dg/private-1.m | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gcc/testsuite/g++.dg/parse/error11.C b/gcc/testsuite/g++.dg/parse/error11.C index 846e676..a67160b 100644 --- a/gcc/testsuite/g++.dg/parse/error11.C +++ b/gcc/testsuite/g++.dg/parse/error11.C @@ -50,7 +50,7 @@ void func(void) // the special error message. Foo<: :B> k2; // { dg-bogus "cannot begin|alternate spelling" "smart error should not be triggered here" } Foo[:B> k1; // { dg-bogus "cannot begin|alternate spelling" "smart error should not be triggered here" } -// { dg-error "6:missing template arguments before" "template" { target *-*-* } { 51 } } +// { dg-error "6:missing template arguments before" "template" { target *-*-* } 51 } // { dg-error "9:expected primary-expression before ':' token" "primary" { target *-*-* } 51 } // { dg-error "9:expected '\]' before ':' token" "backslash" { target *-*-* } 51 } // { dg-error "6:missing template arguments before" "template" { target *-*-* } 52 } diff --git a/gcc/testsuite/g++.dg/parse/error3.C b/gcc/testsuite/g++.dg/parse/error3.C index 938ab45..cf01dbe 100644 --- a/gcc/testsuite/g++.dg/parse/error3.C +++ b/gcc/testsuite/g++.dg/parse/error3.C @@ -5,4 +5,4 @@ static void InstantiateConstraint(const float&, unsigned, void(*AddFunction)(const TYPE&,bool&, char*, char*, unsigned*)); -// { dg-error "60: 'TYPE' does not name a type" "does not" { target *-*-* } { 5 } } +// { dg-error "60: 'TYPE' does not name a type" "does not" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C b/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C index 3130d32..f2b27a6 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C @@ -4,6 +4,6 @@ struct A { // { dg-message "" } forward declaration friend struct B : A { // { dg-error "invalid use of incomplete type 'struct A" "invalid" } int x; - }; // { dg-error "class definition may not be declared a friend" "may not" { target *-*-* } { 5 } } + }; // { dg-error "class definition may not be declared a friend" "may not" { target *-*-* } 5 } int y; }; diff --git a/gcc/testsuite/gcc.dg/990506-0.c b/gcc/testsuite/gcc.dg/990506-0.c index 3cd3be3..3f5f02d 100644 --- a/gcc/testsuite/gcc.dg/990506-0.c +++ b/gcc/testsuite/gcc.dg/990506-0.c @@ -4,6 +4,6 @@ x() { foo (i); - /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } { 6 } } */ - /* { dg-message "function it appears in" "reminder message" { target *-*-* } { 6 } } */ + /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } 6 } */ + /* { dg-message "function it appears in" "reminder message" { target *-*-* } 6 } */ } diff --git a/gcc/testsuite/gcc.dg/cpp/19990413-1.c b/gcc/testsuite/gcc.dg/cpp/19990413-1.c index 17d8441..c72c3a2 100644 --- a/gcc/testsuite/gcc.dg/cpp/19990413-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19990413-1.c @@ -9,5 +9,5 @@ func(void) { FOO(i = 4) - else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } { 12 } } */ + else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } 12 } */ } diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-1.c b/gcc/testsuite/gcc.dg/cpp/pragma-1.c index 7fab025..7b4ee36 100644 --- a/gcc/testsuite/gcc.dg/cpp/pragma-1.c +++ b/gcc/testsuite/gcc.dg/cpp/pragma-1.c @@ -7,7 +7,7 @@ main () #pragma unknown { error; - /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } { 9 } } */ - /* { dg-message "function it appears in" "reminder message" { target *-*-* } { 9 } } */ + /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } 9 } */ + /* { dg-message "function it appears in" "reminder message" { target *-*-* } 9 } */ } } diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-2.c b/gcc/testsuite/gcc.dg/cpp/pragma-2.c index 921f4e5..001365f 100644 --- a/gcc/testsuite/gcc.dg/cpp/pragma-2.c +++ b/gcc/testsuite/gcc.dg/cpp/pragma-2.c @@ -11,6 +11,6 @@ int main () { #pragma unknown {} error; - /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } { 13 } } */ - /* { dg-message "function it appears in" "reminder message" { target *-*-* } { 13 } } */ + /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } 13 } */ + /* { dg-message "function it appears in" "reminder message" { target *-*-* } 13 } */ } diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c index 0b96628..882ae88 100644 --- a/gcc/testsuite/gcc.dg/m-un-2.c +++ b/gcc/testsuite/gcc.dg/m-un-2.c @@ -15,8 +15,8 @@ struct vtable { struct vtable mtable = { malloc, free -}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */ - /* { dg-message "declared here" "warning regression 2" { target *-*-* } {12} } */ +}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } 18 } */ + /* { dg-message "declared here" "warning regression 2" { target *-*-* } 12 } */ /* With designated initializers, we assume you meant to leave out the initialization of any blank fields. */ diff --git a/gcc/testsuite/objc.dg/private-1.m b/gcc/testsuite/objc.dg/private-1.m index a11183c..790ba19 100644 --- a/gcc/testsuite/objc.dg/private-1.m +++ b/gcc/testsuite/objc.dg/private-1.m @@ -35,7 +35,7 @@ { /* Private variables simply don't exist in the subclass. */ private = 12; /* { dg-error "instance variable" } */ - /* { dg-message "function it appears in" "" { target *-*-* } { 37 } } */ + /* { dg-message "function it appears in" "" { target *-*-* } 37 } */ protected = 12; /* Ok */ public = 12; /* Ok */