| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Add warnings introduced in GCC 11.
None of them require Gnulib code changes, so this is just
a documentation change.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Also list warnings that are default
or are enabled by already-given flags. This lets us speed up
checking for attributes, and makes the generated compilation
commands shorter. Add -Wanalyzer-too-complex (too much noise).
* m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT)
(gl_MANYWARN_ALL_GCC): Use gl_AS_VAR_APPEND to append
to shell variables that may have long values.
(gl_MANYWARN_ALL_GCC): Omit flags that are default or are
consequences of other flags, to speed up checking and
shorten commands.
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec:
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
Add GCC 10.1.0 warnings.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Sort. Add -Wattribute-alias,
-Wc11-c2x-compat, -Wcast-result (for the D programming language),
-Wclass-conversion, -Wdeprecated-copy, -Wdeprecated-copy-dtor,
-Winit-list-lifetime, -Wpessimizing-move, -Wprio-ctor-dtor,
-Wredundant-move. Adjust to minor wording changes in GCC 9’s
--help=warnings output.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wabsolute-value,
-Waddress-of-packed-member, -Wattribute-warning, -Wcannot-profile,
-Wmissing-profile. Change -Wattribute-alias to -Wattribute-alias=2.
|
|
|
|
|
|
|
|
|
|
|
| |
This should make things more consistent, as we already ignore
-Wswitch-enum. Problem reported by Reuben Thomas; see:
https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
* build-aux/g++-warning.spec, build-aux/gcc-warning.spec:
Add -Wswitch-default.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Remove -Wswitch-default.
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Add -Wjump-misses-init.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Remove
-Wjump-misses-init.
|
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Add them here, each with an explanation.
* m4/manywarnings.m4: Remove them.
Otherwise, building coreutils, I would see this:
cc1: error: deprecated command line option '-Wchkp' [-Werror]
cc1: error: -Wabi won't warn about anything [-Werror=abi]
cc1: note: -Wabi warns about differences from the most up-to-date ABI,\
which is also used by default
cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Add -Wcatch-value,
-Wclass-memaccess, -Wdo-subscript, -Wextra-semi. Adjust to the
fact that the GCC help message now mentions operands for
-Warray-bounds, -Wformat, -Wformat-overflow, -Wformat-truncation,
-Wimplicit-fallthrough, -Wplacement-new, -Wshift-overflow,
-Wstrict-aliasing, -Wstrict-overflow, -Wstringop-overflow,
and -Wunused-const-variable.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wattribute-alias,
-Wcast-align=strict, -Wcast-function-type, -Wif-not-aligned,
-Wmissing-attributes, -Wmultistatement-macros,
-Wpacked-not-aligned, -Wsizeof-pointer-div, -Wstringop-truncation,
-Wsuggest-attribute=cold, -Wsuggest-attribute=malloc.
|
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec:
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which
requires a non-comment fallthrough attribute. This is a bit
cleaner than the comment versions.
* lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c:
* lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro.
Use it whenever one switch case falls through into the next.
|
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Add GCC 6.1 options that apply to C.
* build-aux/gcc-warning.spec: Add GCC 6.1 options that
do not apply to C, are obsolescent, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec: Add -Wabi=, -Warray-bounds,
-Warray-bounds=, -Wc++14-compat, -Wc90-c99-compat,
-Wc99-c11-compat, -Wshadow-ivar, -Wsized-deallocation,
-Wsuggest-override, -Wuse-without-only. Change
-Wnormalized=... operands to match 5.1.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbool-compare,
-Wchkp, -Wdesignated-init, -Wdiscarded-array-qualifiers,
-Wdiscarded-qualifiers, -Wformat-signedness,
-Wincompatible-pointer-types, -Wint-conversion,
-Wlogical-not-parentheses, -Wmemset-transposed-args, -Wodr,
-Wshift-count-negative, -Wshift-count-overflow,
-Wsizeof-array-argument, -Wsuggest-final-methods,
-Wsuggest-final-types, -Wswitch-bool. Remove -Warray-bounds,
and add -Warray-bounds=2 as a special case.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, make it easier to maintain this in the future.
* build-aux/gcc-warning.spec: Add -Wabi-tag,
-Wconditionally-supported, -Wdelete-incomplete,
-Winherited-variadic-ctor, -Wvirtual-move-assign, -Wzerotrip.
Remove duplicates. Use tabs uniformly, as that's what 'cut' wants.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wdate-time,
-Wopenmp-simd. Use -fdiagnostics-show-option and -funit-at-a-time
only for older GCC versions that need them. Handke
-Wnormalized=nfc specially, so that the 'comm' command used
for maintenance doesn't get confused.
|
|
* m4/manywarnings.m4: Unite lists, and add many new options.
* build-aux/gcc-warning: New file.
Run this command with the latest gcc to see if they have added
options not yet on our list:
gl=.; comm -1 -3 \
<(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' $gl/m4/manywarnings.m4 |sort) \
<(gcc --help=warnings|sed -n 's/^ \(-[^ ]*\) .*/\1/p' |sort \
|grep -v --line-regexp -f <(cut -f1 $gl/build-aux/gcc-warning.spec))
|