From e58bc12f2aa9548ec3c5fe657dffa2024b5926c1 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Thu, 2 May 2013 19:34:26 +0000 Subject: [PATCH] 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 --- src/locale.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/locale.cpp b/src/locale.cpp index c740a51fa..8b6905fe9 100644 --- a/src/locale.cpp +++ b/src/locale.cpp @@ -230,8 +230,10 @@ locale::__imp::__imp(const string& name, size_t refs) // 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(N, other.facets_.size())), @@ -243,7 +245,9 @@ locale::__imp::__imp(const __imp& other) 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),