coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

avoid clang -Wshadow warning


From: Pádraig Brady
Subject: avoid clang -Wshadow warning
Date: Wed, 7 Feb 2024 16:21:48 +0000
User-agent: Mozilla Thunderbird

On 07/02/2024 12:14, Collin Funk wrote:
On 2/7/24 3:14 AM, Pádraig Brady wrote:
I've added and extra configure check for that and pushed.

Thanks, that seems to have fixed it. GCC 12.2.0 and GCC 13.2.1 seemed
to fail from -Werror=shadow. I attached a patch that should fix it.

Ah I see this is clang only, and so reproducible with:

  CC=$(which clang) ./configure --quiet --enable-gcc-warnings=yes WERROR_CFLAGS=

We don't enable warnings by default as yet with clang
as clang identifies itself as GCC 4.2 and we require at least GCC 4.6.
Currently neither gnulib or coreutils are clang warning clean,
so it's not OK to enable warnings by default on clang yet.

As for your patch, this results in no extra complexity,
so is a fine step on the way to being clang warnings clean,
so pushed.

Note since this doesn't change env(1) behavior I adjusted the summary to:
"maint: avoid -Wshadow warning under clang"

BTW -Wshadow is a dev oriented option, rather than a build/distro oriented one,
so would only be appropriate with dev builds. The same is true for -Werror.

> Also, I didn't see there was a bug-coreutils mailing list. Would that
> be a better place to send patches in the future? Thanks.

bug-coreutils is where you want to create a _user_ trackable / findable
report under https://bugs.gnu.org/
The main coreutils is best for design discussions,
and non user facing stuff in general.

So since the clang __bf16 issue is not released yet,
and the clang -Wshadow issue is dev facing,
you used the best list in both cases.

thanks!
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]