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.

llvm-svn: 197314
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: b0d5be563b65ac06ff8b470a6069edd711233136
diff --git a/src/future.cpp b/src/future.cpp
index 70919ab..c67dc58 100644
--- a/src/future.cpp
+++ b/src/future.cpp
@@ -26,8 +26,13 @@
     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 @@
     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