分类: C/C++
2015-09-08 00:18:53
In file included from /usr/include/wchar.h:72:0,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/cwchar:44,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/bits/postypes.h:40,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/iosfwd:40,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/ios:38,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/ostream:38,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/iostream:39,
from easyTest.cpp:1:
/usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/Availability.h:179:44: error: missing binary operator before token "("
#if defined(__has_feature) && __has_feature(attribute_availability_with_message)
^
In file included from /usr/include/wchar.h:72:0,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/cwchar:44,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/bits/postypes.h:40,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/iosfwd:40,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/ios:38,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/ostream:38,
from /usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/iostream:39,
from easyTest.cpp:1:
/usr/local/Cellar/gcc5/5.2.0/include/c++/5.2.0/Availability.h:189:44: error: missing binary operator before token "("
#if defined(__has_feature) && __has_feature(attribute_availability_app_extension)
^
make: *** [easyTest] Error 1
? 5.2.0 git:(master) diff Availability.h /usr/include/Availability.h
173,177d172
< /****
< #ifndef __has_feature
< #define __has_feature(x) 0
< #endif
< *****/
liweimin902015-09-09 09:38:11
后来发现 mac 自带的clang 已经支持c++11 和c++ 14 了,用gcc -v 看到的 4.2.1 和gun gcc 4.2.1 是两码事。。。