The push/pop variant of pragma GCC diagnostic is only supported by Clang
and GCC 4.6 and newer, so protect accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180943 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/locale.cpp b/src/locale.cpp
index c740a51..8b6905f 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -230,8 +230,10 @@
 
 // NOTE avoid the `base class should be explicitly initialized in the
 // copy constructor` warning emitted by GCC
+#if defined(__clang__) || _GNUC_VER >= 406
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wextra"
+#endif
 
 locale::__imp::__imp(const __imp& other)
     : facets_(max<size_t>(N, other.facets_.size())),
@@ -243,7 +245,9 @@
             facets_[i]->__add_shared();
 }
 
+#if defined(__clang__) || _GNUC_VER >= 406
 #pragma GCC diagnostic pop
+#endif
 
 locale::__imp::__imp(const __imp& other, const string& name, locale::category c)
     : facets_(N),