summaryrefslogtreecommitdiff
path: root/build-aux/gcc-warning.spec
Commit message (Collapse)AuthorAgeFilesLines
* manywarnings: update C warnings for GCC 13Paul Eggert2023-04-231-0/+30
| | | | | | | | | | 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.
* manywarnings: update C warnings for GCC 12Paul Eggert2022-05-121-1/+25
| | | | | | | | | 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.
* manywarnings: document GCC 11 warningsPaul Eggert2021-07-311-0/+22
| | | | | | * 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: Update comments.Paul Eggert2020-08-171-2/+2
|
* manywarnings: improve port to GCC 10.1Paul Eggert2020-07-011-6/+138
| | | | | | | | | | | | | * 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.
* manywarnings: port to GCC 10.1Paul Eggert2020-05-091-2/+12
| | | | | | * build-aux/gcc-warning.spec: * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Add GCC 10.1.0 warnings.
* Port manywarnings to GCC 9Paul Eggert2019-05-031-9/+23
| | | | | | | | | | | | * 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.
* manywarnings: omit -Wswitch-defaultPaul Eggert2018-07-011-0/+1
| | | | | | | | | | | 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.
* manywarnings: Don't enable -Wjump-misses-init warnings by default.Bruno Haible2018-06-251-1/+2
| | | | | | * build-aux/gcc-warning.spec: Add -Wjump-misses-init. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Remove -Wjump-misses-init.
* manywarnings: accommodate GCC 9.0-pre: remove -Wchkp and -WabiJim Meyering2018-06-241-0/+2
| | | | | | | | | | | * 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
* manywarnings: port to GCC 8.0Paul Eggert2018-04-281-13/+17
| | | | | | | | | | | | | | | * 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.
* manywarnings: update for GCC 7Paul Eggert2017-05-161-2/+28
| | | | | | | | | | | * 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.
* manywarnings: update for GCC 6.1Paul Eggert2016-05-171-0/+21
| | | | | | | * 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.
* manywarnings: add GCC 5.1 warningsPaul Eggert2015-04-241-1/+11
| | | | | | | | | | | | | | | | | * 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.
* manywarnings: add GCC 4.9 warningsPaul Eggert2014-09-011-11/+10
| | | | | | | | | | | | | 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.
* manywarnings: update the list of "all" warningsJim Meyering2012-09-021-0/+85
* 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))