On Sat, Nov 14, 2009 at 03:41:59PM -0700, Eric Blake wrote: > > Oh, I see. I repeated the experiment on a 64-bit machine, and got the > same error even with -Dbar=1U. It comes because (p - startp) is a 64-bit > ptrdiff_t, but 1U is only 32-bit, so it promotes to long rather than > unsigned long, leaving us in the same boat. But using -Dbar=1LU made the > warning go away. So I'm committing this:
Thank you! > @@ -1071,7 +1071,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, > const CHAR *string_end, > \ > plen = (opt == L_('?') || opt == L_('@') \ > ? pattern_len \ > - : p - startp + 1); \ > + : p - startp + 1UL); \ You don't want the assert() though? I figured it'd be useful for extra safety. -- 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."