| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Stop adding
-Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and
-Wno-analyzer-use-after-free, as these false alarms don’t seem
to be as much of an issue now that we’ve pacified a couple
of individual modules and GCC has some bug fixes.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Set to 2.64.
* DEPENDENCIES: Require Autoconf 2.64 or newer.
* NEWS: Mention the changed requirement.
* m4/00gnulib.m4 (_m4_divert_diversion, AC_DEFUN_ONCE): Remove macros.
* m4/gnulib-common.m4 (AS_VAR_IF, AS_VAR_COPY): Remove macros.
* m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Quote pushdef'ed
variables.
* m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
* m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
* m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C), gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++),
gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): Define through AC_DEFUN.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C), gl_MANYWARN_ALL_GCC(C++)):
Likewise.
* m4/iconv.m4 (AM_ICONV): Define through AC_DEFUN_ONCE directly.
* m4/libunistring.m4 (gl_LIBUNISTRING): Likewise.
* m4/configmake.m4: Update comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/environ.m4: Use AC_CACHE_CHECK where possible.
* m4/manywarnings.m4: Likewise.
* m4/manywarnings-c++.m4: Likewise.
* m4/socklen.m4: Likewise.
* m4/sockpfaf.m4: Likewise.
* m4/stdarg.m4: Likewise.
* m4/visibility.m4: Likewise.
* m4/fsusage.m4: Use AC_CACHE_CHECK where possible. Modernize
indentation.
* m4/ls-mntd-fs.m4: Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix comment so that
it does not mistakenly think that ‘-1)’ is an option.
|
| |
|
| |
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Work better if
LONG_MAX < PTRDIFF_MAX. Problem reported by Richard Copley in:
https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00392.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Autoconf older than 2.63b (such as what ships on CentOS 6) had
a bug that any AC_DEFUN'd macro name that includes shell meta-
characters causes failure due to missing shell quoting during
aclocal's use of autom4te. We can work around the problem by
using m4_defun instead (same semantics in autom4te, but no
longer traced by aclocal, so no longer tickles the shell
quoting bug).
* m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
AC_DEFUN.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
(gl_MANYWARN_ALL_GCC(C++)): Likewise.
Reported-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
| |
* build-aux/g++-warning.spec: New file.
* m4/manywarnings-c++.m4: New file.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C++)): New macro, that
redirects to manywarnings-c++.m4.
* modules/manywarnings (Files): Add m4/manywarnings-c++.m4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL): Renamed from
gl_UNKNOWN_WARNINGS_ARE_ERRORS.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)): New macro.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): New macro.
(gl_UNKNOWN_WARNINGS_ARE_ERRORS): Dispatch to
gl_UNKNOWN_WARNINGS_ARE_ERRORS(_AC_LANG).
(gl_WARN_ADD): Require the gl_UNKNOWN_WARNINGS_ARE_ERRORS specialization
of the current language. If C++ is the current language, modify
WARN_CXXFLAGS instead of WARN_CFLAGS.
* manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): New macro, extracted from
gl_MANYWARN_ALL_GCC.
(gl_MANYWARN_ALL_GCC): Dispatch to gl_MANYWARN_ALL_GCC(_AC_LANG).
|
|
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Compute max safe
object size rather than hardwiring 2147483647. This is needed to
build GNU Emacs, which has one conditional (and used
only-in-theory) call to malloc with a literal greater than
2147483647.
|
|
|
|
|
|
|
|
| |
Problem reported by Pino Toscano in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00150.html
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Use 2**31 - 1,
not 2**63 - 1, to work around the following GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81650
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
| |
* m4/manywarnings.m4: Fix -Wno-missing-field-initializers detection
to be independent of -Wunused-variable. I.E. ensure the latter
warning doesn't occur so that detection of the former is accurate.
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -fno-common
to the list. Quoting the manual, "Compiling with -fno-common is
useful on targets for which it provides better performance, or if
you wish to verify that the program will work on other systems that
always treat uninitialized variable declarations this way [putting
it in the data section]." If diffutils had been using this sooner,
it would have prevented this duplicate declaration issue:
http://git.sv.gnu.org/cgit/diffutils.git/commit/?id=v3.4-10-gc2dc91f
|
|
|
|
|
|
|
| |
* 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/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 (gl_MANYWARN_ALL_GCC): Remove -Wmudflap, since
it is no longer supported in gcc-4.9-to-be.
|
|
|
|
|
|
| |
I ran 'make update-copyright'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With gcc 4.3.4, -Wdisabled-optimization is noisy unless you also
use -funit-at-a-time.
With gcc 4.4.7, there is no indication which warning option
triggered a particular message unless you also use
-fdiagnostics-show-option.
Both of these options are default in newer gcc (such as 4.8.1);
but including them in the list of possible warnings makes the
experience nicer on older platforms.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
some -f options for optimal warnings.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Add -Waggressive-loop-optimizations, -Wreturn-local-addr, which
are new to GCC 4.8. Remove -Wformat=2, -Wmissing-format-attribute,
-Wmissing-noreturn, as they are duplicates of other warnings.
Remove -Wunreachable-code, as it is removed in GCC 4.8 and
was documented to be flaky in earlier versions of GCC.
|
|
|
|
|
|
| |
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some versions of gcc (at least 4.2.1) noisily warn if
-Wuninitialized is given without -O; in isolation, configure
learns that the warning option is supported, but when later
compiling with -Werror, this makes builds fail. If the
option will have no effect for the configured choice of
$CFLAGS, then it is not worth including in the set.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add test for
-Wuninitialized without -O.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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))
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove duplicate
entry for -Wmultichar. -Wno-multichar is in the GCC 4.7.0 manual,
so keep the entry marked as documented.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Doc fix. Suggested by
Jim Meyering <meyering@redhat.com>.
|
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
'1.0D', which is the only way to silence this warning for 'double'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
| |
* m4/manywarnings.m4: Add more warnings from gcc 4.6.2.
|
|
|
|
| |
* m4/manywarnings.m4: Indent by 2 spaces consistently.
|
|
|
|
|
|
| |
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add the above
option if it's needed to allow initialization with { 0, },
which is the case with GCC before version 4.7
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|