On Sat, Nov 14, 2009 at 07:41:24AM -0700, Eric Blake wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > According to Robert Millan on 11/9/2009 2:50 PM: > >> I'm not a fan of unnecessary casts. Can't we instead write this as: > >> > >> : p - startp + 1U; > >> > >> to still show that we intend for unsigned math, but without a cast? > > > > The warning persists. > > Can you show the exact gcc version, command line options, and warning > output that you are seeing with this construct?
gcc-4.4 -Ignulib -I./gnulib -I. -I./include -I./include -Wall -W -DGRUB_LIBDIR=\"/usr/local/lib/`echo grub/i386-pc | sed 's,x,x,'`\" -g -O2 -DGRUB_UTIL=1 -D_FILE_OFFSET_BITS=64 -I./util/mkisofs/include -I./gnulib -Wno-all -Werror -MD -c -o grub_mkisofs-gnulib_fnmatch.o gnulib/fnmatch.c cc1: warnings being treated as errors In file included from gnulib/fnmatch.c:173: gnulib/fnmatch_loop.c: In function ‘ext_match’: gnulib/fnmatch_loop.c:1087: error: signed and unsigned type in conditional expression gnulib/fnmatch_loop.c:1095: error: signed and unsigned type in conditional expression This is GCC 4.4.2. With 4.3.2 I get the same result. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."