Thread: swapping
View Single Post
  #6 (permalink)  
Old 03-15-2008, 04:57 PM
dcs dcs is offline
Programming Expert
 
Join Date: Mar 2008
Posts: 371
Credits: 0
Rep Power: 7
dcs has a spectacular aura aboutdcs has a spectacular aura about
Default Re: swapping

Quote:
Originally Posted by Walle View Post
Is it?

What behavior is undefined?
When signed arithmetic over/underflows, the behavior is undefined.

Quote:
Originally Posted by Walle View Post
What would you say is a smarter way to do it?
The obvious way, using a temporary.
Reply With Quote