summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-04-23 08:53:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2023-04-23 08:54:38 -0700
commit78f7aef9304979d7796dd7d3fc5a2d92d1da0ca6 (patch)
tree03714fea3bc03322e07e77639e02529431536542 /m4
parente3b58d8270e8620639105bd0fddb50625b6e37a9 (diff)
downloadgnulib-78f7aef9304979d7796dd7d3fc5a2d92d1da0ca6.tar.gz
manywarnings: update C warnings for GCC 13
Adjust for C programs compiled by GCC 13. (A C++ expert still needs to look at manywarnings-c++.m4.) * build-aux/gcc-warning.spec: Add warnings introduced in GCC 13. * doc/manywarnings.texi (manywarnings): Document flex arrays. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -fstrict-flex-arrays and -Wstrict-flex-arrays as these should be suitable for Gnulib-using code.
Diffstat (limited to 'm4')
-rw-r--r--m4/manywarnings.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index f88dcc5f12..1d69116ddb 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -109,7 +109,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
# <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
$1=
- for gl_manywarn_item in -fanalyzer \
+ for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
-Wall \
-Warith-conversion \
-Wbad-function-cast \
@@ -137,6 +137,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
-Wpointer-arith \
-Wshadow \
-Wstack-protector \
+ -Wstrict-flex-arrays \
-Wstrict-overflow \
-Wstrict-prototypes \
-Wsuggest-attribute=cold \