[Top][All Lists]

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

Re: gawk-5.1.1 bug report

From: arnold
Subject: Re: gawk-5.1.1 bug report
Date: Wed, 06 Apr 2022 01:04:26 -0600
User-agent: Heirloom mailx 12.5 7/5/10

> On 4/5/22 22:18, arnold@skeeve.com wrote:
> >   dfa.c:1093:27: warning: use of bitwise '&' with boolean operands 
> > [-Wbitwise-instead-of-logical]

Paul Eggert <eggert@cs.ucla.edu> wrote:
> It's valid in C to use bitwise '&' on bool, and doing so here eliminates 
> a conditional branch at the machine level, which can be a win.
> How about if you disable -Wbitwise-instead-of-logical instead, since 
> it's a false alarm?

IMHO clear code beats saving a single branch, which is something I
doubt you can even measure on modern systems.  As Knuth said,
"Premature optimization is the root of all evil." I think that
applies here.

I (at least) request that you make the change in dfa.c.



reply via email to

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