This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22248] Incorrect work with multiple assigment.
- From: "algorithmus at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2005 13:35:47 -0000
- Subject: [Bug c++/22248] Incorrect work with multiple assigment.
- References: <20050630130321.22248.algorithmus@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From algorithmus at gmail dot com 2005-06-30 13:35 -------
no. I guess there is a problem.
just try this progam:
------------
#include<cstdio>
#define swap(a,b) (a^=(b^=(a^=b)))
const int N = 2;
int a[N];
int main()
{
for(int i=0;i<N;i++) a[i] = i;
for(int i=0;i<N/2;i++) swap(a[i],a[N-i-1]);
for(int i=0;i<N;i++) printf("%d ",a[i]);
printf("\n");
return 0;
}
--------
the same result... 0 0
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22248