build-aux/gcc-warning.spec


Log

Author Commit Date CI Message
Paul Eggert efa0065f 2022-05-12T15:13:04 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.
Paul Eggert c44470fb 2021-07-30T12:56:24 manywarnings: document GCC 11 warnings * 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.
Paul Eggert 4f91f6ba 2020-08-17T12:36:28 * build-aux/gcc-warning.spec: Update comments.
Paul Eggert 3831e2e9 2020-07-01T17:00:51 manywarnings: improve port to GCC 10.1 * 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.
Paul Eggert da2a958f 2020-05-09T18:07:38 manywarnings: port to GCC 10.1 * build-aux/gcc-warning.spec: * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Add GCC 10.1.0 warnings.
Paul Eggert 3f14b27d 2019-05-03T10:55:25 Port manywarnings to GCC 9 * 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.
Paul Eggert f24fbe9d 2018-07-01T07:08:32 manywarnings: omit -Wswitch-default 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.
Bruno Haible fcdf335e 2018-06-25T21:04:11 manywarnings: Don't enable -Wjump-misses-init warnings by default. * build-aux/gcc-warning.spec: Add -Wjump-misses-init. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Remove -Wjump-misses-init.
Jim Meyering 63e719c9 2018-06-24T11:31:50 manywarnings: accommodate GCC 9.0-pre: remove -Wchkp and -Wabi * 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
Paul Eggert 36999acc 2018-04-27T22:29:48 manywarnings: port to GCC 8.0 * 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.
Paul Eggert 5e22aee7 2017-05-16T09:23:52 manywarnings: update for GCC 7 * 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.
Paul Eggert 6f9206d4 2016-05-17T09:08:02 manywarnings: update for GCC 6.1 * 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.
Paul Eggert df82ac05 2015-04-24T12:58:46 manywarnings: add GCC 5.1 warnings * 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.
Paul Eggert 157c42ef 2014-09-01T01:51:06 manywarnings: add GCC 4.9 warnings 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.
Jim Meyering dd44da55 2011-11-30T14:25:35 manywarnings: update the list of "all" warnings * 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))