bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: comparison is always false due to limited range of data typ


From: Jim Meyering
Subject: Re: warning: comparison is always false due to limited range of data type
Date: Thu, 01 Sep 2005 10:52:10 +0200

Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>> Is it really permitted to have sizeof (size_t) < sizeof (unsigned int)?
...
>> The offending warning breaks coreutils' `make distcheck' rule.
>
> Would it make sense to rewrite coreutils 'make distcheck' to filter
> out the bogus diagnostics?  That might be a simpler fix.

The failing rule uses $(MAKE) with gcc and CFLAGS containing -Werror.
I'd rather not grep for warnings or ignore all warnings in that file.

Here's the rule, from Makefile.maint:

# Detect format-string/arg-list mismatches that would normally be obscured
# by the use of _().  The --disable-nls effectively defines away that macro,
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
# treated as a failure.  Also, check for shadowing problems with -Wshadow.
# These CFLAGS are pretty strict.  If you build this target, you probably
# have to have a recent version of gcc and glibc headers.
TMPDIR ?= /tmp
t=$(TMPDIR)/$(PACKAGE)/test
my-distcheck: $(local-check)
        -rm -rf $(t)
        mkdir -p $(t)
        GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
        cd $(t)/$(distdir)                              \
          && ./configure --disable-nls                  \
          && $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow' \
              AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)'       \
        ...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]