From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27333 invoked by alias); 4 Oct 2011 21:23:10 -0000 Received: (qmail 27324 invoked by uid 22791); 4 Oct 2011 21:23:09 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Oct 2011 21:22:50 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p94LMOda024824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Oct 2011 17:22:24 -0400 Received: from localhost (ovpn-113-20.phx2.redhat.com [10.3.113.20]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p94LMM2v012294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Oct 2011 17:22:23 -0400 Received: by localhost (Postfix, from userid 500) id 98FA729C129; Tue, 4 Oct 2011 23:22:21 +0200 (CEST) From: Dodji Seketeli To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, tromey@redhat.com, gdr@integrable-solutions.net, joseph@codesourcery.com, burnus@net-b.de, charlet@act-europe.fr, bonzini@gnu.org Subject: Re: [PATCH 3/7] Emit macro expansion related diagnostics References: <8k4ni7n3xflkq6vvecxmsyox.1317761036165@email.android.com> X-URL: http://www.redhat.com Date: Tue, 04 Oct 2011 21:31:00 -0000 In-Reply-To: <8k4ni7n3xflkq6vvecxmsyox.1317761036165@email.android.com> (Jason Merrill's message of "Tue, 04 Oct 2011 16:58:27 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2011-10/txt/msg00273.txt.bz2 Jason Merrill writes: > I was thinking that you could walk the macro expansions to see if the > two locations have an expansion in common, and if so compare the > indices. I guess you could do this only if the locations have the same > expansion location but are not themselves equal. OK. I thought about this but wasn't sure if it would be enough. I'll try this then. > If comparing the expansion locations is enough for how this function > is used that's fine, but the name should be adjusted to be more > specific. OK, let's leave this as a fallback if the above proves to be not be enough, if you don't mind. Thanks. -- Dodji