From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27472 invoked by alias); 11 Apr 2012 13:49:25 -0000 Received: (qmail 27461 invoked by uid 22791); 11 Apr 2012 13:49:21 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 11 Apr 2012 13:49:08 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3BDn71g013653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 11 Apr 2012 09:49:07 -0400 Received: from [10.3.113.125] (ovpn-113-125.phx2.redhat.com [10.3.113.125]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3BDn60x007408; Wed, 11 Apr 2012 09:49:07 -0400 Message-ID: <4F858BD2.7070200@redhat.com> Date: Wed, 11 Apr 2012 13:49:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Dodji Seketeli CC: GCC Patches , Tom Tromey , Gabriel Dos Reis Subject: Re: [PATCH 05/11] Make expand_location resolve to locus in main source file References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-04/txt/msg00645.txt.bz2 On 04/10/2012 03:49 PM, Dodji Seketeli wrote: > Apparently, quite some places in the compiler (like the C/C++ > preprocessor, the debug info machinery) expect expand_location to > resolve to locations that are in the main source file, even if the > token at stake comes from a macro that was defined in a header > somewhere. Turning on -ftrack-macro-expansion by default was > triggering a lot of failures (not necessarily related to diagnostics) > because expand_location resolves to spelling locations instead. Can you elaborate on these failures? For debug info I would think that the spelling location would be useful information, though I suppose without any way to "unwind" to the expansion context it could be a bit confusing. What is the problem for the preprocessor? Jason