This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40471] __sync_fetch_and_add seems not working well for -march=i686
- From: "hailijuan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2009 10:07:35 -0000
- Subject: [Bug c/40471] __sync_fetch_and_add seems not working well for -march=i686
- References: <bug-40471-15289@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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 <gcc-bugzilla@gcc.gnu.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 evaluated
> first, you see 1 1.
>
>
> --
>
> jakub at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40471
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40471