make-w32
[Top][All Lists]
Advanced

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

Re: GNU make 3.81beta4 released


From: Paul D. Smith
Subject: Re: GNU make 3.81beta4 released
Date: Thu, 2 Feb 2006 16:11:18 -0500

%% Eli Zaretskii <address@hidden> writes:

  >> The fix we had for g->changed was actually broken and caused many of the
  >> regression tests to fail, so I fixed it.

  ez> Can you please elaborate? how was it broken?

  ez> All I see when I compare my patched remake.c and the one that's in
  ez> CVS is that you replaced the assignment of g->changed with an
  ez> equivalent if clause.  What am I missing?

It wasn't equivalent.  Compare the:

    if (foo > bar)
        changed = 1;

with

    changed = (foo > bar);

Now consider what happens in both cases if changed == 1 before these
statements run, and (foo <= bar)...

In the first case changed will still be 1, which is what we want.

In the second case, changed will now be 0 ... Doh!

Remember the original was:

    changed += (foo - bar);

which cannot set "changed" back to 0 (except for an overflow, which is
what we were trying to avoid).


Cheers!

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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