From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: Uros Bizjak Cc: gcc@gcc.gnu.org Subject: Re: Is this a gcc bug? Date: Thu, 11 Jan 2001 03:04:00 -0000 Message-id: References: X-SW-Source: 2001-01/msg00705.html On Jan 11, 2001, Uros Bizjak wrote: > printf ("%i, %i, %i, %i\n", x, x += y, x += 2, x += z); > It displays "22, 5, 7, 22". > I would expect the result to be "0, 5, 7, 22". Undefined behavior. A variable is modified more than once without intervening sequence points. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me