Omit -Wzero-as-null-pointer-constant

* configure.ac: If --enable-gcc-warnings, don’t use
-Wzero-as-null-pointer-constant, which is enabled by default with
bleeding-edge Gnulib (as there seems to be movement in this
direction in C2y).  Although -Wzero-as-null-pointer-constant is
useful, Emacs isn’t clean for it yet.
This commit is contained in:
Paul Eggert 2026-01-19 12:24:14 -08:00
parent 128bfa6d44
commit c0afab671c

View file

@ -1804,6 +1804,7 @@ AS_IF([test $gl_gcc_warnings = no],
nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
nw="$nw -Wbad-function-cast" # These casts are no worse than others.
nw="$nw -Wzero-as-null-pointer-constant" # Emacs is not yet C2y-safe.
# Emacs doesn't care about shadowing; see
# <https://lists.gnu.org/r/emacs-diffs/2011-11/msg00265.html>.