[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unus
From: |
Richard Henderson |
Subject: |
Re: [PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused' |
Date: |
Sun, 10 Jan 2021 07:51:37 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 1/10/21 6:27 AM, Philippe Mathieu-Daudé wrote:
> The tcg_out* functions are utility routines that may or
> may not be used by a particular backend. Similarly to commit
> 4196dca63b8, mark them with the 'unused' attribute to suppress
> spurious warnings if they aren't used.
>
> This fixes the build with --enable-tcg-interpreter:
>
> [98/151] Compiling C object libqemu-arm-softmmu.fa.p/tcg_tcg.c.o
> FAILED: libqemu-arm-softmmu.fa.p/tcg_tcg.c.o
> clang [...] -o libqemu-arm-softmmu.fa.p/tcg_tcg.c.o -c ../tcg/tcg.c
> ../tcg/tcg.c:136:20: error: unused function 'tcg_out_dupi_vec'
> [-Werror,-Wunused-function]
>
> Reported-by: Wataru Ashihara <wataash@wataash.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tcg/tcg.c | 30 +++++++++++++++++++++---------
> 1 file changed, 21 insertions(+), 9 deletions(-)
This does too much to fix that Werror, as all of the other functions are
unconditionally used.
Alternately, I'll re-test and merge my tcg constant branch, which will make
tcg_out_dupi_vec also unconditionally used. Then we don't need
__attribute__((unused)) at all.
r~
- [PATCH 0/2] tcg/tci: Fix Clang build, Philippe Mathieu-Daudé, 2021/01/10
- [PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused', Philippe Mathieu-Daudé, 2021/01/10
- Re: [PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused',
Richard Henderson <=
- [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/10
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Thomas Huth, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Daniel P . Berrangé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Daniel P . Berrangé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Daniel P . Berrangé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/21
- Re: Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Wataru Ashihara, 2021/01/23