[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils and GCC -fanalyzer
From: |
Pádraig Brady |
Subject: |
Re: coreutils and GCC -fanalyzer |
Date: |
Fri, 22 May 2020 00:23:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Thunderbird/76.0 |
On 21/05/2020 21:52, Paul Eggert wrote:
On 5/21/20 5:29 AM, Pádraig Brady wrote:
The other pragmas are still needed though to suppress -fanalyzer warnings.
I am not observing this with my copy of GCC 10.1.0. I am using GCC
10.1.0 without any Red-Hat-specific modifications, running on x86-64 (I
built and ran it on RHEL 7.7).
So I'm puzzled as to why you need those pragmas.
I configured coreutils with "./configure --enable-gcc-warnings". If you
configured it with even more warnings than that, that might explain the
issue (though this might also suggest that --enable-gcc-warnings is not
enabling enough warnings...).
I just use the default configure, which auto enables gcc warnings for git repo
builds,
and then build with:
make CFLAGS="-march=native -std=gnu11 -g -O3 -fanalyzer" WERROR_CFLAGS=
I don't think we should worry about GCC warnings that are not enabled
even by --enable-gcc-warnings.
If you are seeing warnings without those pragmas even with plain
"./configure ---enable-gcc-warnings", could you try it again on a plain
10.1.0 release? I'd rather avoid those pragmas if I could, as they
clutter up the code and can make it more error-prone, as we observed
with tsort.c.
Oh we should definitely avoid the pragmas if we thought GCC might
address these issues anytime soon.
I'll try 10.1.0 official release soon.
cheers,
Pádraig