[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] meson: Enable -Wshadow=local
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 1/1] meson: Enable -Wshadow=local |
Date: |
Thu, 26 Oct 2023 08:50:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> On 26/10/23 08:12, Thomas Huth wrote:
>> On 26/10/2023 07.58, Philippe Mathieu-Daudé wrote:
[...]
>>> $ ../configure
>>> The Meson build system
>>> Version: 1.2.1
>>> Build type: native build
>>> Project name: qemu
>>> Project version: 8.1.50
>>> C compiler for the host machine: cc (clang 15.0.0 "Apple clang version
>>> 15.0.0 (clang-1500.0.40.1)")
>>> C linker for the host machine: cc ld64 1015.7
>>> Host machine cpu family: aarch64
>>> Host machine cpu: aarch64
>>> Program sh found: YES (/bin/sh)
>>> Objective-C compiler for the host machine: clang (clang 15.0.0)
>>> Objective-C linker for the host machine: clang ld64 1015.7
>
>
>>> Compiler for Objective-C supports arguments -Wshadow=local: NO
>>>
>>> So:
>>>
>>> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thanks!
>>> Now don't blame me for posting patches with trigger shadow=local
>>> warnings because I am not testing that locally.
>>>
>>> I find it a bit unfair to force me rely on CI or other machines
>>> rather than my host machine to check for warnings. I'd have
>>> rather waited this option support lands first in Clang before
>>> enabling this flag.
I'm not forcing anyone just yet, I'm merely posting a patch to solicit
feedback :)
PRO: It stops the backsliding. Thomas had to fix two new instances
already.
CON: Developers using only Clang may post patches that fail CI. We
don't know how annoying that will be in practice.
>> Huh, that situation is already pre-existing, e.g. with
>> -Wimplicit-fallthrough=2 ... and if you're too afraid, you can always
>> install gcc via homebrew to check.
>
> OK, fine.
I suggest to take the patch now, and if the CON turns out to outweigh
the PRO, revert it.
Re: [PATCH 0/1] Enable -Wshadow=local, Warner Losh, 2023/10/26
Re: [PATCH 0/1] Enable -Wshadow=local, Stefan Hajnoczi, 2023/10/26