From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27484 invoked by alias); 23 Nov 2011 18:21:01 -0000 Received: (qmail 27473 invoked by uid 22791); 23 Nov 2011 18:21:00 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Nov 2011 18:20:45 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RTHR5-0000Yt-II from pedro_alves@mentor.com ; Wed, 23 Nov 2011 10:20:43 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 23 Nov 2011 18:20:41 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH 18/348] Fix -Wsahdow warnings Date: Wed, 23 Nov 2011 18:21:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: "Ulrich Weigand" , Mark Kettenis , andrew.smirnov@gmail.com References: <201111231640.pANGefc4031803@d06av02.portsmouth.uk.ibm.com> In-Reply-To: <201111231640.pANGefc4031803@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111231820.40486.pedro@codesourcery.com> 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/msg00635.txt.bz2 On Wednesday 23 November 2011 16:40:41, Ulrich Weigand wrote: > Mark Kettenis wrote: > > > > From: Andrey Smirnov > > > Date: Tue, 22 Nov 2011 17:25:56 +0700 > > > Subject: [PATCH 18/39] Fix -Wshadow warnings. > > > > > > * amd64-linux-tdep.c (amd64_canonicalize_syscall): Fix -Wshadow > > > warnings. > > > > Why the hell does -Wshadow complain here? > > > > -amd64_canonicalize_syscall (enum amd64_syscall syscall) > > > +amd64_canonicalize_syscall (enum amd64_syscall syscall_number) > > I'd expect this is because the parameter "syscall" shadows the global > function declaration "syscall" provided by glibc headers: > > /usr/include/unistd.h:extern long int syscall (long int __sysno, ...) __THROW; Yeah, this is unfortunate because it means you trigger different shadows on different hosts, or by configuring gdb differently. There was this gcc patch http://comments.gmane.org/gmane.comp.gcc.patches/244771 to stop -Wshadow from complaning about shadowing of symbols in system headers, but it doesn't seem to have been applied, though it was okayed. -- Pedro Alves