[Bug c++/22248] Incorrect work with multiple assigment.
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jun 30 13:26:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-30 13:26 -------
There is no sequence points between the assignments of a[i] so the loading of a[i] can be evaluated in
any order.
You want to define swap as:
#define swap(a,b) do{ a^=b;b^=a;a^=b;}while(0)
This is a dup of bug 11751.
*** This bug has been marked as a duplicate of 11751 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22248
More information about the Gcc-bugs
mailing list