From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57647 invoked by alias); 26 Feb 2015 16:26:18 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 57635 invoked by uid 89); 26 Feb 2015 16:26:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ie0-f173.google.com Received: from mail-ie0-f173.google.com (HELO mail-ie0-f173.google.com) (209.85.223.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 26 Feb 2015 16:26:17 +0000 Received: by ierx19 with SMTP id x19so17418876ier.3 for ; Thu, 26 Feb 2015 08:26:14 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.4.40 with SMTP id h8mr35549333igh.34.1424967974841; Thu, 26 Feb 2015 08:26:14 -0800 (PST) Received: by 10.107.136.80 with HTTP; Thu, 26 Feb 2015 08:26:14 -0800 (PST) In-Reply-To: <54EEF2D4.2000602@redhat.com> References: <54EEF2D4.2000602@redhat.com> Date: Thu, 26 Feb 2015 17:03:00 -0000 Message-ID: Subject: Re: many unused function warnings in gdb 7.9 on darwin From: Jack Howarth To: Pedro Alves Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00067.txt.bz2 Filed http://llvm.org/bugs/show_bug.cgi?id=22712 on this issue. Jack On Thu, Feb 26, 2015 at 5:17 AM, Pedro Alves wrote: > On 02/24/2015 04:33 PM, Jack Howarth wrote: >> Building the gdb 7.9 release on x86_64-apple-darwin14 produces many >> warnings of the form... >> >> remote.c:2567:1: warning: unused function >> 'VEC_thread_item_t_embedded_size' [-Wunused-function] >> DEF_VEC_O(thread_item_t); >> ^ >> ./common/vec.h:435:20: note: expanded from macro 'DEF_VEC_O' >> VEC_T(T); \ >> ^ >> ./common/vec.h:863:22: note: expanded from macro '\ >> DEF_VEC_FUNC_O' >> static inline size_t VEC_OP (T,embedded_size) \ >> ^ >> ./common/vec.h:399:22: note: expanded from macro 'VEC_OP' >> #define VEC_OP(T,OP) VEC_##T##_##OP >> ^ >> :55:1: note: expanded from here >> VEC_thread_item_t_embedded_size >> ^ >> >> Shouldn't those VEC declarations use a wrapper to avoid them on >> targets not supporting that code? > > AFAIK, -Wunused-function is supposed to be suppressed for > "static inline" functions: > > -Wunused-function > Warn whenever a static function is declared but not defined > or a non-inline static function is unused. This warning is > enabled by -Wall. > > Looks like a clang bug here? > > (I suspect marking the function with attribute used would > work around this.) > > Thanks, > Pedro Alves >