Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jack Howarth <howarth.mailing.lists@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: many unused function warnings in gdb 7.9 on darwin
Date: Thu, 26 Feb 2015 17:03:00 -0000	[thread overview]
Message-ID: <CADtEn-3Bg+ByB0bWyBodqa6V8QwHCoYsoFY_Eemmh0nNAwwLgw@mail.gmail.com> (raw)
In-Reply-To: <54EEF2D4.2000602@redhat.com>

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 <palves@redhat.com> 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
>>                      ^
>> <scratch space>: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
>


  reply	other threads:[~2015-02-26 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 16:33 Jack Howarth
2015-02-26 16:48 ` Pedro Alves
2015-02-26 17:03   ` Jack Howarth [this message]
2015-02-26 19:59     ` Jack Howarth
2015-02-26 20:21       ` Paul_Koning
2015-02-27  9:13         ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADtEn-3Bg+ByB0bWyBodqa6V8QwHCoYsoFY_Eemmh0nNAwwLgw@mail.gmail.com \
    --to=howarth.mailing.lists@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox