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 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.