Skip to content

Instantly share code, notes, and snippets.

@MetroWind
Created September 19, 2013 20:14
Show Gist options
  • Save MetroWind/6629201 to your computer and use it in GitHub Desktop.
Save MetroWind/6629201 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
#ifdef __GNUC__
printf("I'm gcc. yay~~\n");
#else
printf("I'm not gcc. Yay~~\n");
#endif
#ifdef __clang__
printf("I'm clang. yay~~\n");
#else
printf("I'm not clang. Yay~~\n");
#endif
return 0;
}
@MetroWind
Copy link
Author

corsair@Fity% clang --version
Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

corsair@Fity% clang test.c && ./a.out
I'm gcc. yay~~
I'm clang. yay~~

WTF???!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment