LLVM and GCC, different output same code
问题 This is a sample code just to show a different output from the LLVM compiler and the GCC. I wonder why? The answer should be very simple, but I can't see it. (Xcode 4.6.1) The code: #include <stdio.h> #define MAX(a,b) ( (a) > (b) ? (a) : (b) ) int increment() { static int i = 42; i += 5; printf("increment returns %d\n",i); return i; } int main( int argc, char ** argv ) { int x = 50; printf("max of %d and %d is %d\n", x,increment(),MAX(x, increment())); printf("max of %d and %d is %d\n", x