From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116485 invoked by alias); 24 Apr 2017 19:48:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 107521 invoked by uid 89); 24 Apr 2017 19:48:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:1493047, H*f:sk:1493047, H*i:sk:1493047, becomes X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Apr 2017 19:48:27 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B72B73B714; Mon, 24 Apr 2017 19:48:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B72B73B714 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dmalcolm@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B72B73B714 Received: from ovpn-121-45.rdu2.redhat.com (ovpn-121-45.rdu2.redhat.com [10.10.121.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C9CB17967; Mon, 24 Apr 2017 19:48:25 +0000 (UTC) Message-ID: <1493063304.9106.90.camel@redhat.com> Subject: Re: [RFC, testsuite] Add dg-save-linenr From: David Malcolm To: Tom de Vries , Mike Stump , Rainer Orth Cc: GCC Patches , Jakub Jelinek Date: Mon, 24 Apr 2017 20:46:00 -0000 In-Reply-To: <1493047222.9106.82.camel@redhat.com> References: <1493047222.9106.82.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg01065.txt.bz2 On Mon, 2017-04-24 at 11:20 -0400, David Malcolm wrote: > On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote: > > Hi, > > > > there are currently two types of line number supported in > > dg-{error,warning,message,bogus} directives: absolute and relative. > > With an absolute line number, it's immediately clear what line > > number > > is > > meant, but when a line is added at the start of the file, the line > > number needs to be updated. With a relative line number, that > > problem > > is solved, but when relative line numbers become large, it becomes > > less > > clear what line it refers to, and when adding a line inbetween the > > directive using the relative line number and the line it refers to, > > the > > relative line number still needs to be updated. > > > > This patch adds a directive dg-save-linenr with argument varname, > > that > > saves the line number of the directive in a variable varname, which > > can > > be used as line number in dg directives. > > > > Testing status: > > - tested updated test-case objc.dg/try-catch-12.m > > - ran tree-ssa.exp > > > > RFC: > > - good idea? > > Excellent idea; thanks! There are various places where I'd find this > useful e.g. the test cases within https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01061.html