From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27209 invoked by alias); 24 Nov 2011 11:36:16 -0000 Received: (qmail 27107 invoked by uid 22791); 24 Nov 2011 11:36:15 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Nov 2011 11:35:47 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RTXal-0000ie-0n; Thu, 24 Nov 2011 06:35:47 -0500 Date: Thu, 24 Nov 2011 11:36:00 -0000 Message-Id: From: Eli Zaretskii To: Andrey Smirnov CC: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org In-reply-to: (message from Andrey Smirnov on Thu, 24 Nov 2011 10:16:14 +0600) Subject: Re: [PATCH 18/348] Fix -Wsahdow warnings Reply-to: Eli Zaretskii References: <201111231640.pANGefc4031803@d06av02.portsmouth.uk.ibm.com> <201111231820.40486.pedro@codesourcery.com> <201111232023.pANKNcLf022983@glazunov.sibelius.xs4all.nl> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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/msg00679.txt.bz2 > Date: Thu, 24 Nov 2011 10:16:14 +0600 > From: Andrey Smirnov > Cc: gdb-patches > > > It seems a lot of the changes posted up until now are dealing with > > that type of "conflict".  I'd really like to see those dropped from > > this set. > > > > It is not a "conflict". It is a conflict. I'm with Andrey on this one. Catching variables that clash with well-known global identifiers, such as library functions, are about the only good reason for using -Wsahdow; all the other kinds of "shadowing" it flags are usually perfectly correct usage of C. (I was actually bitten once by a mysterious bug caused by a variable whose name was identical to an external symbol that came from a library. I don't wish anybody to get into such a conundrum.)