[cfe-commits] [libcxx] r165151 - in /libcxx/trunk: CREDITS.TXT include/__config

Howard Hinnant hhinnant at apple.com
Wed Oct 3 13:48:05 PDT 2012


Author: hhinnant
Date: Wed Oct  3 15:48:05 2012
New Revision: 165151

URL: http://llvm.org/viewvc/llvm-project?rev=165151&view=rev
Log:
Holger Arnold:  Correct the use and testing of __GNUC__ and __GNUC_MINOR__ in <__config>.

Modified:
    libcxx/trunk/CREDITS.TXT
    libcxx/trunk/include/__config

Modified: libcxx/trunk/CREDITS.TXT
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CREDITS.TXT?rev=165151&r1=165150&r2=165151&view=diff
==============================================================================
--- libcxx/trunk/CREDITS.TXT (original)
+++ libcxx/trunk/CREDITS.TXT Wed Oct  3 15:48:05 2012
@@ -66,3 +66,7 @@
 N: Dimitry Andric
 E: dimitry at andric.com
 D: Visibility fixes, minor FreeBSD portability patches.
+
+N: Holger Arnold
+E: holgerar at gmail.com
+D: Minor fix.

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=165151&r1=165150&r2=165151&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Wed Oct  3 15:48:05 2012
@@ -15,6 +15,10 @@
 #pragma GCC system_header
 #endif
 
+#ifdef __GNUC__
+#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
+#endif
+
 #define _LIBCPP_VERSION 1101
 
 #define _LIBCPP_ABI_VERSION 1
@@ -53,7 +57,8 @@
 #  define _LIBCPP_LITTLE_ENDIAN 1
 #  define _LIBCPP_BIG_ENDIAN    0
 // Compiler intrinsics (GCC or MSVC)
-#  if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3)
+#  if (defined(_MSC_VER) && _MSC_VER >= 1400) \
+   || (defined(__GNUC__) && _GNUC_VER > 403)
 #    define _LIBCP_HAS_IS_BASE_OF
 #  endif
 #endif  // _WIN32
@@ -308,15 +313,15 @@
 #define _LIBCPP_HAS_NO_TRAILING_RETURN
 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
 
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
+#if _GNUC_VER < 403
 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #endif
 
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
+#if _GNUC_VER < 403
 #define _LIBCPP_HAS_NO_STATIC_ASSERT
 #endif
 
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+#if _GNUC_VER < 404
 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #define _LIBCPP_HAS_NO_DECLTYPE
 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
@@ -324,9 +329,9 @@
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_VARIADICS
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-#endif  // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+#endif  // _GNUC_VER < 404
 
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
+#if _GNUC_VER < 406
 #define _LIBCPP_HAS_NO_NULLPTR
 #endif
 





More information about the cfe-commits mailing list