From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112609 invoked by alias); 8 Jun 2016 03:18:33 -0000 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 Received: (qmail 112277 invoked by uid 89); 8 Jun 2016 03:17:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Jun 2016 03:17:45 +0000 Received: from ball (CPE00fc8d3ff2d3-CM00fc8d3ff2d0.cpe.net.cable.rogers.com [99.242.1.93]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 20673C15F; Wed, 8 Jun 2016 03:17:44 +0000 (UTC) Date: Wed, 08 Jun 2016 03:18:00 -0000 From: Trevor Saunders To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA 6/6] Add -Wunused-but-set-* to build Message-ID: <20160608032455.GD30231@ball> References: <1465248812-23902-1-git-send-email-tom@tromey.com> <1465248812-23902-7-git-send-email-tom@tromey.com> <20160608023751.GC30231@ball> <87shwo5rec.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87shwo5rec.fsf@tromey.com> User-Agent: Mutt/1.6.0 (2016-04-01) X-SW-Source: 2016-06/txt/msg00149.txt.bz2 On Tue, Jun 07, 2016 at 08:46:35PM -0600, Tom Tromey wrote: > >>>>> "Trevor" == Trevor Saunders writes: > > Trevor> isn't everything in -Wunused enabled now? can we just delete > Trevor> -Wno-unused and use -Wall to get us -Wunused? > > I didn't think of that -- thanks. From the gcc docs I see > -Wunused-label, -Wunused-local-typedefs, and -Wunused-parameter. That > final one seems difficult for gdb given the many functions that are > called via function pointers but which do not use all their arguments. the docs for -Wunused-parameter are... tricky, but I believe what they say is -Wall -Wunused does not enable -Wunused-parameter, to enable -Wunused-parameter you either need to pass it explicitly, or pass -Wextra -Wunused. > Once the switch to C++ is complete, such parameters could be nameless. > To me that seems better than sticking ATTRIBUTE_UNUSED in many places. I'd agree, and at that point it might make sense to enable -Wunused-parameter. Trev > > Tom