From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3066 invoked by alias); 6 Sep 2016 21:58:59 -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 3050 invoked by uid 89); 6 Sep 2016 21:58:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=coretypes.h, coretypesh, UD:coretypes.h, Hx-languages-length:1565 X-HELO: mail-yb0-f193.google.com Received: from mail-yb0-f193.google.com (HELO mail-yb0-f193.google.com) (209.85.213.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Sep 2016 21:58:58 +0000 Received: by mail-yb0-f193.google.com with SMTP id x93so4998959ybh.0 for ; Tue, 06 Sep 2016 14:58:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=OQe6NSs1JYJQG1IIFwgCvgWL1FFljiHbrx19PYAPwFg=; b=jTfQk8uU+85SVausb2udid9wxqUFmInmLESXAsXlY5M4I+e57j55Z0o9aYYB7UnHUi hXqUV65GoQH5/C3PaJOE7/8ge8Lj1O7JrjzKo2zcFVcFFxcZCyM1+qPRJzS9gKnzqr0r RLvEuV0j4cfsjFtXoX1kq6mytAS/zAyi8ukO7BESR4YGc/XdrA73JLGH//7lHgsElXVb 5qP9iLdNBMZfk0eEde0CT7nDyFLRaSxBoLjKjnlznnjePbh3jEHZVeUu68pNjenby4fA OcXsE3C6ZQglAXCzCT0F0ICGg075ALy3FycxPaMiOKjm+uz3HMYIOIXhQrL+Z4iu4iym zmIw== X-Gm-Message-State: AE9vXwPvLiAPynh/9TX4FmfEK7hI1qAGo3yM+a2gh7nStvnWKl2RE4qPMaZ4mT6Jy08U3g== X-Received: by 10.37.208.19 with SMTP id h19mr13630078ybg.171.1473199136455; Tue, 06 Sep 2016 14:58:56 -0700 (PDT) Received: from [192.168.0.26] (75-166-199-51.hlrn.qwest.net. [75.166.199.51]) by smtp.gmail.com with ESMTPSA id f7sm12276644ywh.30.2016.09.06.14.58.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 14:58:55 -0700 (PDT) Subject: Re: [PATCH] Move class substring_loc from c-family into gcc To: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= , David Malcolm , GCC Patches References: <1472141352-10884-1-git-send-email-dmalcolm@redhat.com> <57CA035B.6080206@gmail.com> <067a2cb4-5380-34be-2ec6-d501010a3fb7@gmail.com> From: Martin Sebor Message-ID: <57CF3C1E.2040901@gmail.com> Date: Tue, 06 Sep 2016 22:07:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <067a2cb4-5380-34be-2ec6-d501010a3fb7@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00351.txt.bz2 On 09/03/2016 03:13 AM, Manuel López-Ibáñez wrote: > On 02/09/16 23:55, Martin Sebor wrote: >>> diff --git a/gcc/substring-locations.h b/gcc/substring-locations.h >>> index f839c74..bb0de4f 100644 >>> --- a/gcc/substring-locations.h >>> +++ b/gcc/substring-locations.h >>> @@ -20,6 +20,73 @@ along with GCC; see the file COPYING3. If not see >>> #ifndef GCC_SUBSTRING_LOCATIONS_H >>> #define GCC_SUBSTRING_LOCATIONS_H >>> >>> +#include >>> + > > Is this header file going to be used in the middle-end? If so, then it > is suspicious that it includes cpplib.h. Otherwise, perhaps it should > live in c-family/ I'm not sure if you meant this question for me or for David but I believe the main (only?) reason for this patch is let to make use, in the -Wformat-length middle-end pass, of the same range location API as in c-family/c-format in the C/C++ front ends. David, please correct me if I mischaracterized it. Martin > > I'm not complaining about substring-locations.c because libcpp is > already linked with everything else even for other non-C languages, like > Ada, but the above is leaking all cpplib.h into the rest of the > compiler, which defeats the purpose of this in coretypes.h > > /* Provide forward struct declaration so that we don't have to include > all of cpplib.h whenever a random prototype includes a pointer. > Note that the cpp_reader and cpp_token typedefs remain part of > cpplib.h. */ > > struct cpp_reader; > struct cpp_token; > > > Cheers, > Manuel. > > > > >