[Bug c/40471] __sync_fetch_and_add seems not working well for -march=i686

2009-06-17 Thread hailijuan at gmail dot com
--- Comment #2 from hailijuan at gmail dot com 2009-06-17 10:07 --- Subject: Re: __sync_fetch_and_add seems not working well for -march=i686 Yes, I have seen the difference. Thanks muchly. I will close it. 2009/6/17 jakub at gcc dot gnu dot org : > > > --- Comment #1 from

[Bug c/40471] __sync_fetch_and_add seems not working well for -march=i686

2009-06-17 Thread jakub at gcc dot gnu dot org
--- Comment #1 from jakub at gcc dot gnu dot org 2009-06-17 08:04 --- That's undefined behavior, there is no sequence point between the the evaluation of foo (&n, n) and evaluation of n passed as the next argument. If foo (&n, n) is evaluated first, you will see 1 2 printed, if n is eval