]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: gnulib: avoid false -Wstringop-overflow warning
authorPádraig Brady <P@draigBrady.com>
Thu, 18 May 2023 10:40:19 +0000 (11:40 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 18 May 2023 10:57:26 +0000 (11:57 +0100)
Tested on gcc 13.1.1 with: make CFLAGS='-O0 -ggdb'

* configure.ac: Disable -Wstringop-overflow for gnulib.
This warning is far too problematic in my experience:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
and triggers with gcc -O0 with versions 12,13 at least.

configure.ac

index f61076d2b9d854b8160ae606c00308c383600f17..27e7431576c672c2234dc96e5014ac32a19152eb 100644 (file)
@@ -261,6 +261,11 @@ if test $gl_gcc_warnings != no; then
   # FP in careadlinkat.c w/gcc 10.0.1 20200205
   gl_WARN_ADD([-Wno-return-local-addr])
 
+  # FIXME: remove this line when gcc improves
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
+  # FP wth -O0 in nstrftime.c w/gcc 12, and 13 at least
+  gl_WARN_ADD([-Wno-stringop-overflow])
+
   gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
   AC_SUBST([GNULIB_WARN_CFLAGS])