In <https://lists.gnu.org/r/coreutils/2022-01/msg00017.html> Assaf Gordon writes:

I'm getting few warnings-as-errors when building the latest version from git 
(using Debian 10 amd64 with gcc 8.3.0).

I wouldn't worry about these. We typically don't bother to pacify older GCC versions as they typically generate false alarms that are not worth worrying about.

In <https://lists.gnu.org/r/coreutils/2022-01/msg00018.html> Assaf Gordon writes:

with clang-14 ( Debian clang version 
14.0.0-++20211220125923+c79a67196828-1~exp1~20211220130019.184 )

Those warnings can also be ignored (as we typically don't worry overmuch about bogus warnings from Clang either), except:

warning: unknown warning option '-Wno-unsuffixed-float-constants' 
[-Wunknown-warning-option]


Which, I see was removed from gnulib in 2011,
and reinstated just now in
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0c8a563f65d44752b33aec42cceec25bd485f2d5

This appears to be a bug in that Gnulib commit. Presumably this code in m4/gnulib-common.m4:

#if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
      -Wno-unsuffixed-float-constants
      #endif

needs to be adjusted as far as Clang versions go. Do you happen to know which Clang versions support that option?

Also, since 'configure' is already testing for which warning options work by invoking the compiler directly, perhaps this part of gnulib-common.m4 could leverage off that work rather than trying to hardcode which compilers support which options.

I'll cc this to bug-gnulib for further comment there.

Reply via email to