Subject: Re: CVS commit: basesrc
To: Michael Eriksson <eramore@era-t.ericsson.se>
From: Bill Squier <groo@cs.stevens-tech.edu>
List: source-changes
Date: 03/01/2000 14:59:24
On Wed, Mar 01, 2000 at 08:28:42PM +0100, Michael Eriksson wrote:
> > Modified Files:
> > basesrc/usr.bin/make: make.c
> >
> > Log Message:
> > Fixed the oodate test to include the check of gn->cmtime == 0 without
> > breaking the original intent.
>
> The new test,
>
> oodate = (gn->cmtime == 0 || Arch_LibOODate (gn) ||
> (gn->cmtime == 0 && (gn->type & OP_DOUBLEDEP)));
>
> looks like a complicated way of writing
>
> oodate = (gn->cmtime == 0 || Arch_LibOODate (gn));
Indeed it is; that's an application of the associativity of || and a logical
law called absorption. (x || (x && y)) == x.
--
Bill Squier (groo@cs.stevens-tech.edu)
http://www.cs.stevens-tech.edu/~groo
Ph: (201)216-5486 Fax: (201)216-8249