summaryrefslogtreecommitdiff
path: root/doc
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 /doc
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 'doc')
-rw-r--r--doc/manywarnings.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/manywarnings.texi b/doc/manywarnings.texi
index 32237dc67f..ea1b758cc0 100644
--- a/doc/manywarnings.texi
+++ b/doc/manywarnings.texi
@@ -80,6 +80,13 @@ The @code{-fanalyzer} option generates many false alarms about
@code{malloc} leaks, which @code{manywarnings} suppresses by also
using @option{-Wno-analyzer-malloc-leak}.
+@item -fstrict-flex-arrays
+The @code{manywarnings} module by default uses GCC's
+@option{-fstrict-flex-arrays} option if available, so that GCC can
+warn about nonportable usage of flexible array members.
+In a few cases this can help GCC generate better code,
+so it is not strictly a warning option.
+
@item -Wsign-compare
GCC and Clang generate too many false alarms with @option{-Wsign-compare},
and we don't recommend that warning. You can disable it by using