Skip to content

Commit

Permalink
Holger Arnold: Correct the use and testing of __GNUC__ and __GNUC_MIN…
Browse files Browse the repository at this point in the history
…OR__ in <__config>.

llvm-svn: 165151
  • Loading branch information
Howard Hinnant committed Oct 3, 2012
1 parent bfdde7c commit f543a75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions libcxx/CREDITS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ D: Minor patches to is_convertible.
N: Dimitry Andric
E: dimitry@andric.com
D: Visibility fixes, minor FreeBSD portability patches.

N: Holger Arnold
E: holgerar@gmail.com
D: Minor fix.
17 changes: 11 additions & 6 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -308,25 +313,25 @@ namespace std {
#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
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#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

Expand Down

0 comments on commit f543a75

Please sign in to comment.