Pádraig Brady wrote:
> As of gnulib commit 4a127339b244
> coreutils CI is failing on GCC 10 with:
> 
> CC       src/coreutils-coreutils.o
> cc1: error: command-line option '-Wuseless-cast' is valid for C++/ObjC++ but 
> not for C [-Werror]
> cc1: all warnings being treated as errors

I can reproduce it by configuring coreutils with
  ./configure --enable-gcc-warnings
with gcc 13.

The config.log contains this:

configure:97102: checking whether C compiler handles -Wuseless-cast
configure:97122: gcc -o conftest -g -O2  -Wuseless-cast   conftest.c  >&5
cc1: warning: command-line option '-Wuseless-cast' is valid for C++/ObjC++ but 
not for C
configure:97122: $? = 0
configure:97136: result: yes

It looks like manywarnings.m4 should only try this option if the gcc version
is >= 14.

Bruno




Reply via email to