[comp.sys.amiga] Bug in Aztec 3.6a found

dillon@CORY.BERKELEY.EDU (Matt Dillon) (08/18/88)

	The following doesn't work properly:

#define FOO()	(X++, 0)

main()
{
    short X = 1;

    if (FOO()) {
	puts("Incorrect operation");
	puts("This should never happen");
    } else {
	puts("Correct operation");
    }
}

	The problem stems from the ++ operator on X... the expression FOO()
is *always* 0 (remember the definition of the comma operator), yet when placed
in the if becomes dependant on the variable X.

	I mailed the problem to Jim (manx@well.UUCP)

					-Matt