From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30108 invoked by alias); 1 Nov 2011 17:43:25 -0000 Received: (qmail 30014 invoked by uid 22791); 1 Nov 2011 17:43:21 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_20,KAM_MX3,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,URIBL_BLACK 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, 01 Nov 2011 17:43:05 +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 pA1Hh4Oj019972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Nov 2011 13:43:04 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pA1Hh3B3010212; Tue, 1 Nov 2011 13:43:03 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pA1Hh2Cg030464; Tue, 1 Nov 2011 13:43:02 -0400 From: Tom Tromey To: Andrey Smirnov Cc: gdb-patches Subject: Re: [PATCH 01/17] Enable building with -Wshadow References: Date: Tue, 01 Nov 2011 17:43:00 -0000 In-Reply-To: (Andrey Smirnov's message of "Tue, 1 Nov 2011 16:58:15 +0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00018.txt.bz2 >>>>> "Andrey" == Andrey Smirnov writes: Andrey> On the supr of the moment, while reading Project Ideas page on Andrey> GDB wiki, I've decided to undertake the task of making Andrey> compilation with -Wshadow flag possible (seeing how that is a Andrey> simple task for a person unfamiliar with gdb's code base). Thanks. Andrey> So, having configured the code with Andrey> gcc.gnu.org Andrey> CFLAGS="-D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -Wshadow -Werror Andrey> -ansi" ./configure I would suggest instead adding -Wshadow to build_warnings in gdb/configure.ac. I am not sure whether the other subdirectories in src are interested in -Wshadow. Andrey> I rummaged through it and fixed all naming clashes. Andrey> In the attachment to this letter is a 1st in the series of 17 patches. Andrey> The majority of the changes is related to fixing -Wshadow caused errors Andrey> with two or three fixes related to -Werror and -ansi flags. I don't think we want -ansi, though I am not sure. I think it would be good to separate out these patches so we can see. Andrey> - What is the common way(etiquette?) of sending a series patches to this Andrey> list? Do I send them all at once or do I wait 'till the end of Andrey> discussion about the first one? You can send them all at once. However -- I think the best overall approach would be to separate "pretty obvious" patches from ones that are not as obvious. I know they are all just renamings, but I think some forms of shadowing (like purely within a single function) are much easier to review than others. Also I expect some may be contentious, perhaps even the whole project will be. Andrey> - Does the part of MAINTAINERS file about patches to libiberty, Andrey> libdecnumber and intl needing to be sent to GCC still holds true or Andrey> should I send them to this list? Bfd and binutils? Yes, libdecnumber and libiberty are canonically maintained in GCC. I don't know if they want -Wshadow or not. BFD patches should go to binutils. I also don't know if they want -Wshadow. Andrey> - In case the patches got applied and building with -Wshadow is working Andrey> would it be possible to add aforementioned CFLAGS to the set of Andrey> default ones? The configure.ac change will handle this. Andrey> P.S. Forgot to mention that I checked for regressions by running Andrey> 'make check' and, to the best of my knowledge, fixed all that Andrey> have been cased by my patches. Thanks. I suspect you are going to need a copyright assignment in place. I think it is maybe a grey area, since the patches are generally mechanical, but it can't hurt. Contact me off-list and I will get you started. I didn't read this patch yet. If we need paperwork we might as well wait for it to be finished. Tom