Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon
From: dillon@CORY.BERKELEY.EDU (Matt Dillon)
Newsgroups: comp.sys.amiga
Subject: Bug in Aztec 3.6a found
Message-ID: <8808180651.AA10752@cory.Berkeley.EDU>
Date: 18 Aug 88 06:51:40 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 23


	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