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
This commit is contained in:
parent
34cb066fa2
commit
e58bc12f2a
@ -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<size_t>(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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user