From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54690 invoked by alias); 5 Oct 2015 13:55:28 -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 54679 invoked by uid 89); 5 Oct 2015 13:55:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 05 Oct 2015 13:55:24 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id D3EF48EA30 for ; Mon, 5 Oct 2015 13:55:22 +0000 (UTC) Received: from localhost.localdomain (vpn1-4-36.ams2.redhat.com [10.36.4.36]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t95DtLRw025278; Mon, 5 Oct 2015 09:55:22 -0400 Subject: Re: [patch 0/3] Header file reduction. To: Andrew MacLeod , gcc-patches References: <560DEA79.8050709@redhat.com> From: Bernd Schmidt Message-ID: <56127AA4.9090707@redhat.com> Date: Mon, 05 Oct 2015 13:55:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <560DEA79.8050709@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00410.txt.bz2 On 10/02/2015 04:22 AM, Andrew MacLeod wrote: > The patches are generated by a pair of tools. > * gcc-order-includes goes through the headers and canonically reorders some of our more common/troublesome headers and removes any duplicates. This includes headers which are included by other headers. (ie, obstack.h can be removed as a duplicate if bitmap.h is included already.) > * remove-includes is the tool which tries to remove each non-conditional header file and does the real work. Is the bitmap/obstack example really one of a change that is desirable? I think if a file uses obstacks then an include of obstack.h is perfectly fine, giving us freedom to e.g. change bitmaps not to use obstacks. Given that multiple headers include obstack.h, and pretty much everything seems to indirectly include bitmap.h anyway, maybe a better change would be to just include it always in system.h. > I'll have a patch shortly to add these and some other useful tools to a > header-tools directory in contrib. How soon? It's difficult to meaningfully comment on these patches without looking at how they were generated. Two points: * diff -c is somewhat unusual and I find diff -u much more readable. * Maybe the patches for reordering and removing should be split, also for readability and for easier future identification of problems. Bernd