in reply to Re^4: Swapping two values
in thread Swapping two values

Exactly. The optimization assumes that changing one variable does not change the other and vice versa. When they overlap in memory, this stops being true.
  • Comment on Re: Re: Re: Re: Re: Swapping two values