-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Robert Millan on 11/15/2009 3:46 AM:
>
> You don't want the assert() though? I figured it'd be useful for extra
> safety.
Safety from what? The code has been quite well-tested, belongs to a
static method, and both p and startp are loca
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,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Robert Millan on 11/14/2009 8:30 AM:
: 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
>
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
-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
Btw, excuse me for the duplicate mail. It's a bit odd, but I don't
receive any mail from the list (my server doesn't register attempts
from mailman), even though I'm subscribed (if I try to re-subscribe,
I do receive a notification).
Perhaps someone could investigate this?
--
Robert Millan
> 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.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you
Fixes a build warning in fnmatch_loop.c.
--
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."
gnulib/fnmatch_loop
Robert Millan aybabtu.com> writes:
> Fixes a build warning in fnmatch_loop.c.
>
>
> -: p - startp + 1); \
> +: (unsigned) (p - startp) + 1); \
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
Fixes a build warning in fnmatch_loop.c.
--
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."
gnulib/fnmatch_loop
10 matches
Mail list logo