Jim Meyering <[EMAIL PROTECTED]> wrote: > Paul Eggert <[EMAIL PROTECTED]> wrote: >> It will take a while for this [gcc] fix to propagate, though. In the
Is there a patch yet to make gcc suppress that warning? FYI, here is the warning again [line 586 referred to the test in the expansion of xalloc_oversized]: > quotearg.c: In function `quotearg_n_options': > quotearg.c:586: warning: comparison is always false due to limited range of > data type In the meantime, I've just checked in this change in coreutils/lib: 2005-08-31 Jim Meyering <[EMAIL PROTECTED]> * quotearg.c (quotearg_n_options): Change code to be suboptimal, in order to avoid an unsuppressible warning from gcc on 64-bit systems. Index: lib/quotearg.c =================================================================== RCS file: /fetish/cu/lib/quotearg.c,v retrieving revision 1.45 diff -u -p -r1.45 quotearg.c --- lib/quotearg.c 14 May 2005 07:58:07 -0000 1.45 +++ lib/quotearg.c 31 Aug 2005 07:27:32 -0000 @@ -581,7 +581,12 @@ quotearg_n_options (int n, char const *a if (nslots <= n0) { - unsigned int n1 = n0 + 1; + /* FIXME: technically, the type of n1 should be `unsigned int', + but that evokes an unsuppressible warning from gcc-4.0.1 and + older. If gcc ever provides an option to suppress that warning, + revert to the original type, so that the test in xalloc_oversized + is once again performed only at compile time. */ + size_t n1 = n0 + 1; if (xalloc_oversized (n1, sizeof *slotvec)) xalloc_die (); _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib