diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-26 16:34:24 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-26 16:34:24 +0000 |
commit | 4176ce096510479b797ea78d60ec753e340b32dc (patch) | |
tree | 9edc53bf63b981b4a43ccf59323db191f3ef1075 /gcc/configure.ac | |
parent | 7a3a29d0d81ad02727273aed6655166034d786e8 (diff) | |
download | gcc-4176ce096510479b797ea78d60ec753e340b32dc.tar.gz |
* configure.ac (ac_cv_std_swap_in_utility): New test.
* system.h (<algorithm>): Check HAVE_SWAP_IN_UTILITY as well.
* configure: Regenerate.
* config.in: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232836 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 4dc7c109a26..6cfb68a8520 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -416,6 +416,15 @@ struct X<long long> { typedef long long t; }; ]], [[X<int64_t>::t x;]])],[],[AC_MSG_ERROR([error verifying int64_t uses long long])]) fi +AC_CACHE_CHECK(for std::swap in <utility>, ac_cv_std_swap_in_utility, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <utility> +]], [[int a, b; std::swap(a,b);]])],[ac_cv_std_swap_in_utility=yes],[ac_cv_std_swap_in_utility=no])]) +if test $ac_cv_std_swap_in_utility = yes; then + AC_DEFINE(HAVE_SWAP_IN_UTILITY, 1, + [Define if <utility> defines std::swap.]) +fi + # Check whether compiler is affected by placement new aliasing bug (PR 29286). # If the host compiler is affected by the bug, and we build with optimization # enabled (which happens e.g. when cross-compiling), the pool allocator may |