swap(x,y)

mcdonald at uxe.cso.uiuc.edu mcdonald at uxe.cso.uiuc.edu
Wed Aug 30 01:17:00 AEST 1989


Just for curiosity, is anyone's compiler smart enough to optimize


temp = x;
x = y;
y = temp;

into an XCHG instruction? What about Fortran compilers on the
equivalent construct?

Doug MCDonald



More information about the Comp.lang.c mailing list