diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-04-23 08:53:59 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-04-23 08:54:38 -0700 |
commit | 78f7aef9304979d7796dd7d3fc5a2d92d1da0ca6 (patch) | |
tree | 03714fea3bc03322e07e77639e02529431536542 /doc | |
parent | e3b58d8270e8620639105bd0fddb50625b6e37a9 (diff) | |
download | gnulib-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.texi | 7 |
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 |