[Bug c++/22248] New: Incorrect work with multiple assigment.

2005-06-30 Thread algorithmus at gmail dot com
hi! I have a problem with multiply assigment at i386-portbld-freebsd5.4 gcc version 4.0.1 20050609 (prerelease) [FreeBSD] and the same problem in DJGPP with gcc 4.0.0 I've compiled my cpp file with this command line: g++40 new.cpp ---new.cpp #includecstdio #define swap(a,b) a^=b^=a^=b

Re: [Bug c++/22248] New: Incorrect work with multiple assigment.

2005-06-30 Thread Gabriel Dos Reis
algorithmus at gmail dot com [EMAIL PROTECTED] writes: | ---new.cpp | #includecstdio | | #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.