Source-Changes-D archive

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

Re: CVS commit: src/usr.bin/make



    Date:        Thu, 9 Dec 2021 22:25:58 +0000
    From:        "Roland Illig" <rillig%netbsd.org@localhost>
    Message-ID:  <20211209222558.CDF22FAEC%cvs.NetBSD.org@localhost>

  | make: avoid recursion in CondParser_Or
  |
  | Previously, a long chain of '1 || 1 || 1 || 1 || ...' led to a deep
  | recursion.  Furhermore, the code didn't match the grammar on superficial
  | reading: the grammar said "or || and", the code said "and || or".
  |
  | No functional change.

That obviously wasn't true.   That means that you just guessed at that,
so the comment should have been "No functional change intended" instead,
but more importantly, for changes this significant you should *always*
be doing a test release build before committing.

I know that you have reverted this now, which is fine, but for the record
the problem was that your change broke short circuit evaluation.

Once an || test returns true, you don't do any more of them, the answer
is already known.   The expression that failed depended upon that, as is
allowed.

kre



Home | Main Index | Thread Index | Old Index