diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-11-18 12:46:02 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-11-18 12:46:02 +0000 |
commit | 3b39526e0a34a41f916f80bcb45f2e1c64dcf763 (patch) | |
tree | 971414e140f7bff8ea233a8ae3a6cce92cd7e2b6 /libstdc++-v3/include/std/bit | |
parent | 5be106b86006e00c80bf846a172b2b69b40d10ef (diff) | |
download | gcc-3b39526e0a34a41f916f80bcb45f2e1c64dcf763.zip gcc-3b39526e0a34a41f916f80bcb45f2e1c64dcf763.tar.gz gcc-3b39526e0a34a41f916f80bcb45f2e1c64dcf763.tar.bz2 |
libstdc++: Fix some -Wsystem-headers warnings
* include/bits/alloc_traits.h (allocator_traits::construct)
(allocator_traits::destroy, allocator_traits::max_size): Add unused
attributes to parameters that are not used in C++20.
* include/std/bit (__ceil2): Add braces around assertion to avoid
-Wmissing-braces warning.
From-SVN: r278401
Diffstat (limited to 'libstdc++-v3/include/std/bit')
-rw-r--r-- | libstdc++-v3/include/std/bit | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/bit b/libstdc++-v3/include/std/bit index e89bca2..7b5253b 100644 --- a/libstdc++-v3/include/std/bit +++ b/libstdc++-v3/include/std/bit @@ -225,7 +225,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // by UBSan, and by debug assertions. #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED if (!__builtin_is_constant_evaluated()) - __glibcxx_assert( __shift_exponent != numeric_limits<_Tp>::digits ); + { + __glibcxx_assert( __shift_exponent != numeric_limits<_Tp>::digits ); + } #endif using __promoted_type = decltype(__x << 1); if _GLIBCXX17_CONSTEXPR (!is_same<__promoted_type, _Tp>::value) |