bug-gnulib
[Top][All Lists]
Advanced

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

Re: ftell: two minor proposed patches


From: Paul Eggert
Subject: Re: ftell: two minor proposed patches
Date: Sun, 24 Jul 2011 10:54:05 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11

On 07/24/11 10:25, Bruno Haible wrote:
> I thought about this as well, but it has the drawback that "grep '(long)'"
> wouldn't find this occurrence.

That's a minor disadvantage.  Such a grep is doomed to failure,
as gnulib must have hundreds of conversion to 'long' that the 'grep'
will miss.  Avoiding the error-proneness of the cast is more important
than using the cast to highlight this particular conversion.

That being said, it may be that you prefer highlighting this particular
conversion because it may narrow the value.  If that's the case, how
about this idea instead?  It has a "(long)" that can be grepped for,
and it avoids the cast.

  if (LONG_MIN <= offset && offset <= LONG_MAX)
    return /* (long) */ offset;

Personally I don't like this kind of decoration, as I think it's
unnecessary clutter, but it's better than what we have now because
it avoids the cast.

> when you rebased your proposed commits, the ChangeLog entries did not go
> in at the top. Are you using the 'git-merge-changelog' driver?

No, I used "git rebase -i", generated a revised patch, and then
applied it with "git am".



reply via email to

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