OK to commit? We build lib using gcc warnings, but not gnulib-tests; it is nicer to treat all gnulib files equally. Right now, many of the gnulib tests are quite noisy with coreutils' set of warnings, that will involve a series of patches to gnulib to clean up.
Meanwhile, I was seeing multiple instances of warnings like this when using cygwin's gcc 4.3.4: CC mbswidth.o cc1: warning: -funit-at-a-time is required for inlining of functions that are only called once [-Wdisabled-optimization] as well as crud not ignored by git. >From 057a3db6d91933b698f6d9cc81f41c81af7db01a Mon Sep 17 00:00:00 2001 From: Eric Blake <[email protected]> Date: Wed, 21 Oct 2009 11:27:29 -0600 Subject: [PATCH] maint: turn on compiler warnings for gnulib tests * gnulib-tests/Makefile.am (AM_CFLAGS): Add WARN_CFLAGS. * configure.ac (enable-gcc-warnings): Also use -funit-at-a-time, to silence gcc 4.3.4 -Wdisabled-optimization. * .gitignore: Ignore some more files. --- .gitignore | 3 +++ configure.ac | 1 + gnulib-tests/Makefile.am | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 1116620..f6b6859 100644 --- a/.gitignore +++ b/.gitignore @@ -47,11 +47,13 @@ lib/arpa lib/binary-io.h lib/charset.alias lib/configmake.h +lib/glthread lib/libcoreutils.a lib/printf.c lib/progname.c lib/progname.h lib/selinux +lib/unistr lib/uniwidth m4/.cvsignore m4/.gitignore @@ -71,4 +73,5 @@ po/stamp-po src/version.c src/version.h stamp-h1 +tests/test-suite.log tests/*/*.log diff --git a/configure.ac b/configure.ac index 4902fea..3efc819 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,7 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Wno-logical-op]) gl_WARN_ADD([-fdiagnostics-show-option]) + gl_WARN_ADD([-funit-at-a-time]) AC_SUBST([WARN_CFLAGS]) diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am index 6635f70..494786f 100644 --- a/gnulib-tests/Makefile.am +++ b/gnulib-tests/Makefile.am @@ -1 +1,3 @@ include gnulib.mk + +AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS) -- 1.6.4.2
