summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-05-12 15:13:04 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-05-12 15:14:22 -0700
commitefa0065f1682f53fb15ad427555ddedec6ec51eb (patch)
treeefed320353a585a10ff6963a173faa02bfc0abc8 /m4
parent44092ee9761177660d57237d3334a645e1fab3c1 (diff)
downloadgnulib-efa0065f1682f53fb15ad427555ddedec6ec51eb.tar.gz
manywarnings: update C warnings for GCC 12
Adjust for C programs compiled by GCC 12. (A C++ expert still needs to look at manywarnings-c++.m4.) * build-aux/gcc-warning.spec: Add warnings introduced in GCC 12. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbidi-chars=any,ucn and -Wuse-after-free=3. Although not enabled by -Wall or -Wextra they seem suitable for Gnulib-using C code.
Diffstat (limited to 'm4')
-rw-r--r--m4/manywarnings.m42
1 files changed, 2 insertions, 0 deletions
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 253393e51b..f4b5853f02 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -167,11 +167,13 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
# them here so that the above 'comm' command doesn't report a false match.
gl_AS_VAR_APPEND([$1], [' -Warray-bounds=2'])
gl_AS_VAR_APPEND([$1], [' -Wattribute-alias=2'])
+ gl_AS_VAR_APPEND([$1], [' -Wbidi-chars=any,ucn'])
gl_AS_VAR_APPEND([$1], [' -Wformat-overflow=2'])
gl_AS_VAR_APPEND([$1], [' -Wformat=2'])
gl_AS_VAR_APPEND([$1], [' -Wformat-truncation=2'])
gl_AS_VAR_APPEND([$1], [' -Wimplicit-fallthrough=5'])
gl_AS_VAR_APPEND([$1], [' -Wshift-overflow=2'])
+ gl_AS_VAR_APPEND([$1], [' -Wuse-after-free=3'])
gl_AS_VAR_APPEND([$1], [' -Wunused-const-variable=2'])
gl_AS_VAR_APPEND([$1], [' -Wvla-larger-than=4031'])