[libcxx] r195431 - Compiling libcxx with gcc 4.6.4 (MingW) produces these errors:

Yaron Keren yaron.keren at gmail.com
Fri Nov 22 01:22:12 PST 2013


Author: yrnkrn
Date: Fri Nov 22 03:22:12 2013
New Revision: 195431

URL: http://llvm.org/viewvc/llvm-project?rev=195431&view=rev
Log:
Compiling libcxx with gcc 4.6.4 (MingW) produces these errors:

 type_traits:3280:31: error: expected primary-expression before 'decltype'
 type_traits:3280:29: error: expected ';' at end of member declaration

 memory:2415:49: error: function 'std::__1::default_delete<_Tp>::default_delete()'
 defaulted on its first declaration must not have an exception-specification

 memory:2435:49: error: function 'std::__1::default_delete<_Tp []>::default_delete()'
 defaulted on its first declaration must not have an exception-specification

The attached patch defines _LIBCPP_HAS_NO_ADVANCED_SFINAE and 
_LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS for gcc version < 4.7, making
the library compile with gcc 4.6.4.


Modified:
    libcxx/trunk/include/__config

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=195431&r1=195430&r2=195431&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Fri Nov 22 03:22:12 2013
@@ -389,9 +389,7 @@ namespace std {
 #endif
 
 #if _GNUC_VER < 404
-#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #define _LIBCPP_HAS_NO_DECLTYPE
-#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_VARIADICS
@@ -402,6 +400,11 @@ namespace std {
 #define _LIBCPP_HAS_NO_NULLPTR
 #endif
 
+#if _GNUC_VER < 407
+#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#endif
+
 #endif  // __GXX_EXPERIMENTAL_CXX0X__
 
 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {





More information about the cfe-commits mailing list