Changeset 117934 in webkit
- Timestamp:
- May 22, 2012 1:46:00 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r117919 r117934 1 2012-05-22 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 GCC 4.7 and C++11 support. 4 https://bugs.webkit.org/show_bug.cgi?id=86465 5 6 Reviewed by Darin Adler. 7 8 Detect C++11 mode in GCC 4.7 and set appropiate compiler feature flags. 9 Turn C++11 override control into a compiler feature flag. 10 Fix non-clang support of compiler feature CXX_DELETED_FUNCTIONS. 11 12 * wtf/Compiler.h: 13 * wtf/Noncopyable.h: 14 1 15 2012-05-22 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/WTF/wtf/Compiler.h
r117779 r117934 46 46 #endif 47 47 48 #define CLANG_PRAGMA(PRAGMA) _Pragma(PRAGMA) 49 48 50 /* Specific compiler features */ 49 51 #define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES __has_feature(cxx_variadic_templates) … … 53 55 #define WTF_COMPILER_SUPPORTS_BLOCKS __has_feature(blocks) 54 56 #define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT __has_extension(c_static_assert) 57 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL __has_extension(cxx_override_control) 55 58 56 59 #define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_extension(has_trivial_destructor) 57 60 61 #endif 62 63 #ifndef CLANG_PRAGMA 64 #define CLANG_PRAGMA(PRAGMA) 58 65 #endif 59 66 … … 74 81 #endif 75 82 83 #if !COMPILER(CLANG) 84 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1 85 #define WTF_COMPILER_QUIRK_FINAL_IS_CALLED_SEALED 1 86 #endif 87 76 88 #endif 77 89 … … 107 119 #if COMPILER(GCC) && !COMPILER(CLANG) 108 120 #if GCC_VERSION_AT_LEAST(4, 7, 0) && __cplusplus >= 201103L 121 #define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1 122 #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1 109 123 #define WTF_COMPILER_SUPPORTS_CXX_NULLPTR 1 124 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1 110 125 #define WTF_COMPILER_QUIRK_GCC11_GLOBAL_ISINF_ISNAN 1 111 126 … … 221 236 #endif 222 237 223 /* OVERRIDE */ 224 225 #ifndef OVERRIDE 226 #if COMPILER(CLANG) 227 #if __has_extension(cxx_override_control) 238 /* OVERRIDE and FINAL */ 239 240 #if COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL) 228 241 #define OVERRIDE override 229 #endif 230 #elif COMPILER(MSVC) 231 #define OVERRIDE override 232 #endif 233 #endif 234 235 #ifndef OVERRIDE 242 243 #if COMPILER_QUIRK(FINAL_IS_CALLED_SEALED) 244 #define FINAL sealed 245 #else 246 #define FINAL final 247 #endif 248 249 #else 236 250 #define OVERRIDE 237 #endif238 239 /* FINAL */240 241 #ifndef FINAL242 #if COMPILER(CLANG)243 #if __has_extension(cxx_override_control)244 #define FINAL final245 #endif246 #elif COMPILER(MSVC)247 #define FINAL sealed248 #endif249 #endif250 251 #ifndef FINAL252 251 #define FINAL 253 252 #endif -
trunk/Source/WTF/wtf/Noncopyable.h
r111778 r117934 26 26 #if COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS) 27 27 #define WTF_MAKE_NONCOPYABLE(ClassName) \ 28 _Pragma("clang diagnostic push") \29 _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") \30 _Pragma("clang diagnostic ignored \"-Wc++0x-extensions\"") \28 CLANG_PRAGMA("clang diagnostic push") \ 29 CLANG_PRAGMA("clang diagnostic ignored \"-Wunknown-pragmas\"") \ 30 CLANG_PRAGMA("clang diagnostic ignored \"-Wc++0x-extensions\"") \ 31 31 private: \ 32 32 ClassName(const ClassName&) = delete; \ 33 33 ClassName& operator=(const ClassName&) = delete; \ 34 _Pragma("clang diagnostic pop")34 CLANG_PRAGMA("clang diagnostic pop") 35 35 #else 36 36 #define WTF_MAKE_NONCOPYABLE(ClassName) \ -
trunk/Tools/ChangeLog
r117920 r117934 1 2012-05-22 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 GCC 4.7 and C++11 support. 4 https://bugs.webkit.org/show_bug.cgi?id=86465 5 6 Reviewed by Darin Adler. 7 8 Update detection of C++11 mode in GCC. 9 10 * qmake/mkspecs/features/unix/default_post.prf: 11 1 12 2012-05-22 Hao Zheng <zhenghao@chromium.org> 2 13 -
trunk/Tools/qmake/mkspecs/features/unix/default_post.prf
r113848 r117934 17 17 isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror 18 18 greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) { 19 if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x) ) {19 if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x) && !contains(QMAKE_CXXFLAGS, -std=c++11) && !contains(QMAKE_CXXFLAGS, -std=gnu++11)) { 20 20 # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr). 21 21 QMAKE_CFLAGS_WARN_ON += -Wno-c++0x-compat
Note: See TracChangeset
for help on using the changeset viewer.