C++20: work around g++ 10.1 bug #95242
With GCC 10.1 all comparisons that default to the <=> C++20 comparison operator emit a spurious zero-as-null-pointer-constant warning, which is an error in our configuration. This is due to an implementation choice in the libstdc++ library, so it also causes warning from clang++ 10.0 when using the same libstdc++ library. A fix for GCC PR95242 was committed in g++ (not in libstdc++), so while g++ 10.2 might be fixed, clang++ will need a similar fix. I've seen those failures on Arch linux with gcc 10.1.0-2 and clang 10.0.0-3. On Debian sid, g++ 10.1.0-4 seems to already include the fix. * m4/gccwarn.m4: Include a string comparison in the test code so that -Wzero-as-null-pointer-constant is not enabled if it would produce warnings on such statements.
Please register or sign in to comment