From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 12BC0385043C; Mon, 29 Mar 2021 20:04:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12BC0385043C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r10-9612] libstdc++: Fix some -Wsystem-headers warnings (PR 95765) X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: ad70672e19712c480c138f8c3823f7566fe4e5f8 X-Git-Newrev: e5431137ca9787f6d8747c1d1c3f85f7b10fde35 Message-Id: <20210329200459.12BC0385043C@sourceware.org> Date: Mon, 29 Mar 2021 20:04:59 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 20:04:59 -0000 https://gcc.gnu.org/g:e5431137ca9787f6d8747c1d1c3f85f7b10fde35 commit r10-9612-ge5431137ca9787f6d8747c1d1c3f85f7b10fde35 Author: Jonathan Wakely Date: Fri Jun 19 18:15:15 2020 +0100 libstdc++: Fix some -Wsystem-headers warnings (PR 95765) PR libstdc++/95765 * include/bits/stl_algobase.h (__size_to_integer(float)) (__size_to_integer(double), __size_to_integer(long double)) (__size_to_integer(__float128)): Cast return type explicitly. (cherry picked from commit 5b6215083bd6a3e10dd142e1c5d4fab011d6f074) Diff: --- libstdc++-v3/include/bits/stl_algobase.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index e397ccf64c3..44370721381 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -984,14 +984,14 @@ _GLIBCXX_END_NAMESPACE_CONTAINER #endif inline _GLIBCXX_CONSTEXPR long long - __size_to_integer(float __n) { return __n; } + __size_to_integer(float __n) { return (long long)__n; } inline _GLIBCXX_CONSTEXPR long long - __size_to_integer(double __n) { return __n; } + __size_to_integer(double __n) { return (long long)__n; } inline _GLIBCXX_CONSTEXPR long long - __size_to_integer(long double __n) { return __n; } + __size_to_integer(long double __n) { return (long long)__n; } #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) inline _GLIBCXX_CONSTEXPR long long - __size_to_integer(__float128 __n) { return __n; } + __size_to_integer(__float128 __n) { return (long long)__n; } #endif template