Skip to content

Instantly share code, notes, and snippets.

@lidaobing
Last active December 16, 2015 17:40
Show Gist options
  • Save lidaobing/5472213 to your computer and use it in GitHub Desktop.
Save lidaobing/5472213 to your computer and use it in GitHub Desktop.
苹果家的 cpp 行为不一致
#define a(k) printf("k")
int main() {
a(hello);
}
$ cpp --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cpp 1.c
# 1 "1.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "1.c"
int main() {
printf("hello");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment