summaryrefslogtreecommitdiffstats
path: root/src/future.cpp
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2013-12-14 06:45:09 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2013-12-14 06:45:09 +0000
commit8f48c23568a122de6088455700e9d197b79bd8f8 (patch)
tree7282206b2133f9c5236bfc91d28ad58e02d28799 /src/future.cpp
parentbfd68bf0c7e32187dd4be7bd27fdec05d7b833fd (diff)
downloadexternal_libcxx-8f48c23568a122de6088455700e9d197b79bd8f8.tar.gz
external_libcxx-8f48c23568a122de6088455700e9d197b79bd8f8.tar.bz2
external_libcxx-8f48c23568a122de6088455700e9d197b79bd8f8.zip
Fix GCC unknown pragma warning in libc++.
We should check defined(__clang__) before the usage of the clang diagnostic pragmas. The [-Wswitch] warning in src/future.cpp should be ignored. As the result, the equivalent GCC pragma is added. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@197314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/future.cpp')
-rw-r--r--src/future.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/future.cpp b/src/future.cpp
index 70919ab7d..c67dc5882 100644
--- a/src/future.cpp
+++ b/src/future.cpp
@@ -26,8 +26,13 @@ __future_error_category::name() const _NOEXCEPT
return "future";
}
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wswitch"
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch"
+#endif
string
__future_error_category::message(int ev) const
@@ -50,7 +55,11 @@ __future_error_category::message(int ev) const
return string("unspecified future_errc value\n");
}
+#if defined(__clang__)
#pragma clang diagnostic pop
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC diagnostic pop
+#endif
const error_category&
future_category() _NOEXCEPT