[Bug c++/22248] Incorrect work with multiple assigment.
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Thu Jun 30 13:19:00 GMT 2005
------- Additional Comments From gdr at integrable-solutions dot net 2005-06-30 13:19 -------
Subject: Re: New: Incorrect work with multiple assigment.
"algorithmus at gmail dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| ---new.cpp----
| #include<cstdio>
|
| #define swap(a,b) a^=b^=a^=b
You're modifying objects more than once without intervening sequence
points. All bets are off. There is a standard utility std::swap() from
<utility> that works all the time.
PR invalid.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22248
More information about the Gcc-bugs
mailing list