bug-gnulib
[Top][All Lists]
Advanced

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

Compilations warnings-as-errors when building from git


From: Paul Eggert
Subject: Compilations warnings-as-errors when building from git
Date: Sat, 15 Jan 2022 12:44:43 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

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

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