Discussion:
avoid new GCC-7-exposed warnings
(too old to reply)
Eric Blake
2016-11-01 22:24:36 UTC
Permalink
Raw Message
I tried to build the coreutils using very recent GCC 7, built from
latest git, and encountered a few new warnings (errors when configured
with --enable-gcc-warnings), so wrote the following to address them.
From 35f28e3cdc0132ef87c5213e0c42b5b409d188d7 Mon Sep 17 00:00:00 2001
Date: Mon, 3 Oct 2016 09:00:48 -0700
Subject: [PATCH 1/3] gnulib: update to latest and adapt printf-quote.sh test
* .gitignore: Add /lib/limits.h.
* tests/misc/printf-quote.sh: Reflect that a single quote is now
rendered as "'", rather than as ''\'''.
---
.gitignore | 1 +
gnulib | 2 +-
tests/misc/printf-quote.sh | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
git bisect is pointing to this commit as the culprit for this error on
my Fedora 24 box:

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh
/home/eblake/coreutils/build-aux/missing aclocal-1.15 -I m4
configure.ac:60: warning: gl_LIMITS_H is m4_require'd but not m4_defun'd
m4/inttypes.m4:10: gl_INTTYPES_H is expanded from...
m4/gnulib-comp.m4:815: gl_INIT is expanded from...
configure.ac:60: the top level
cd . && /bin/sh /home/eblake/coreutils/build-aux/missing automake-1.15
--gnu
configure.ac:60: warning: gl_LIMITS_H is m4_require'd but not m4_defun'd
m4/inttypes.m4:10: gl_INTTYPES_H is expanded from...
m4/gnulib-comp.m4:815: gl_INIT is expanded from...
configure.ac:60: the top level
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh
/home/eblake/coreutils/build-aux/missing autoconf
configure.ac:60: warning: gl_LIMITS_H is m4_require'd but not m4_defun'd
m4/inttypes.m4:10: gl_INTTYPES_H is expanded from...
m4/gnulib-comp.m4:815: gl_INIT is expanded from...
configure.ac:60: the top level
configure:15775: error: possibly undefined macro: gl_LIMITS_H
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Makefile:5900: recipe for target 'configure' failed
make: *** [configure] Error 1

I haven't yet bisected which commit in gnulib is responsible for the
problem, but it is somewhere in here:.
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 6d237fd01d98f2cdd588055a088fed39646ab82f
+Subproject commit 7dad5f25591de682c452c3fc39ffe2fa11e21491
7dad5f2 getprogname: IBM z/OS: avoid NULL-dereference
d487c18 test-stdint: use _GL_VERIFY rather than "verify" for some tests
f3f2de7 Add missing ChangeLog entry
136ecf4 stdint: port SIZE_MAX to glibc s390
d75cbb3 getprogname: port to IBM z/OS
7838dc2 maint: remove stray space after "." in AC_DEFINE comment.
0a4afb9 long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
ea93369 utimecmp: avoid new GCC 7 warning from -Wbool-operation
2692e23 dfa: save memory for states
1ef6865 wchar, wctype-h: fix for MinGW 3.22.2
d392d49 long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
d7ccbff utimecmp: avoid new GCC 7 warning from -Wbool-operation
d0afb6a autoupdate
2ed5c11 quotearg: minimize shell quoting using double quotes
e63f5eb vasnprintf.c: avoid spurious warning from GCC 7
65e6915 getprogname: correct the test for a __progname variable
5f7358c u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough
5f919be dfa: build: avoid warning from GCC 7's new -Wimplicit-fallthrough
af62896 getprogname: avoid __progname vs program_invocation_short_name
pitfall
9a8bf3b getprogname: port to OpenBSD 5.1
85854ba sched: port to GCC 6.2.1 on macOS Sierra
fce9b3f tests/init.sh: port Alpine fix to AIX 7.1
3be4273 nl_langinfo: pacify GCC
fe3086f stdint: also set GL_GENERATE_LIMITS_H
b019226 limits-h, stdint: Don't assume extensions, fix typo
e24a470 getprogname: port to AIX
dfcf8b0 update from texinfo
e89b4a7 update from texinfo
f0e9aab extensions: fix typo in comment
b81c53b stdint: support new _WIDTH macros
0d12d16 limits-h: new module
45080de stdio: don't redefine __USE_MINGW_ANSI_STDIO
a512e04 sys_types: avoid glibc 2.25 warnings about major()
4da63c5 mountlist: include sysmacros.h for glibc
f215ec4 extensions: port to more ISO C TSes
6625c98 intprops: new macro TYPE_WIDTH
66786c1 extensions: port to recent ISO C TRs
b3ffc1d update from texinfo
2389970 update from texinfo
04b939c dfa: port to Solaris 9
e7c79d6 autoupdate
8e114d3 strverscmp: avoid link failure on OS X
2867203 dfa: new module, importing grep's DFA matcher
6d237fd getprogname-tests: don't depend on assert-h

My guess is the new limits-h module.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Eric Blake
2016-11-02 18:46:24 UTC
Permalink
Raw Message
Post by Eric Blake
Subject: [PATCH 1/3] gnulib: update to latest and adapt printf-quote.sh test
* .gitignore: Add /lib/limits.h.
* tests/misc/printf-quote.sh: Reflect that a single quote is now
rendered as "'", rather than as ''\'''.
---
.gitignore | 1 +
gnulib | 2 +-
tests/misc/printf-quote.sh | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
git bisect is pointing to this commit as the culprit for this error on
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh
/home/eblake/coreutils/build-aux/missing aclocal-1.15 -I m4
configure.ac:60: warning: gl_LIMITS_H is m4_require'd but not m4_defun'd
Hmm. Now I can't reproduce the problem on a fresh checkout. I suspect it
is a side effect of running bootstrap at the right times (or more
likely, failing to re-run bootstrap while trying to do my git bisect).
So at this point, I think it was just a false positive on my end, and
not a problem in gnulib.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Loading...