From: Pádraig Brady Date: Thu, 18 May 2023 10:40:19 +0000 (+0100) Subject: build: gnulib: avoid false -Wstringop-overflow warning X-Git-Tag: v9.4~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aed3b8190aca198ac4ef7f7951ee67da61569598;p=thirdparty%2Fcoreutils.git build: gnulib: avoid false -Wstringop-overflow warning 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. --- diff --git a/configure.ac b/configure.ac index f61076d2b9..27e7431576 100644 --- a/configure.ac +++ b/configure.ac @@ -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])