%% Eli Zaretskii <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>          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


_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to