grep-devel
[Top][All Lists]
Advanced

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

Re: [Grep-devel] avoiding new warnings


From: Jim Meyering
Subject: Re: [Grep-devel] avoiding new warnings
Date: Mon, 22 May 2017 22:22:44 -0700

On Sun, May 21, 2017 at 1:10 PM, Paul Eggert <address@hidden> wrote:
> Jim Meyering wrote:
>>
>> two of the three instances it flagged in grep
>> were odd enough that I feel they benefit from the added attention
>
>
> Anybody reading those two instances of the code would already know what's
> going on; it's pretty obvious, it's already commented, and to my mind the
> extra attention gets in the way more than it helps.
>
> I agree that it would be better to advise the compiler directly about the
> optimization that's needed there, if GCC etc. ever get around to doing that.
> (I'm pretty sure the optimization advice is still needed, by the way: static
> compilers typically don't have enough information, and even dynamic ones
> would have troubles with those two.)

I feel that the false positives should be sufficiently rare that it's
worth leaving it on by default. It might catch me doing something
stupid even before I run a test :-) Contrast with options like
-Waggregate-return that coreutils, grep, diffutils, gzip and others
disable via configure.ac. If you'd prefer a file-wide directive or
some other syntax in kwset.c, I'll be happy to adjust.



reply via email to

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