public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/users/aldyh/heads/ranger-staging)] libstdc++: Fix some -Wsystem-headers warnings (PR 95765)
Date: Sat, 27 Jun 2020 21:22:39 +0000 (GMT)	[thread overview]
Message-ID: <20200627212239.9B6E83840C0F@sourceware.org> (raw)

https://gcc.gnu.org/g:5b6215083bd6a3e10dd142e1c5d4fab011d6f074

commit 5b6215083bd6a3e10dd142e1c5d4fab011d6f074
Author: Jonathan Wakely <jwakely@redhat.com>
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.
            * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
            Remove unused typedef.

Diff:
---
 libstdc++-v3/include/bits/stl_algobase.h      | 8 ++++----
 libstdc++-v3/include/bits/stl_uninitialized.h | 3 ---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index 41dd740d34a..4fc8850d707 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -1039,14 +1039,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<typename _OutputIterator, typename _Size, typename _Tp>
diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h
index b5248fd49ea..a3ccb72078b 100644
--- a/libstdc++-v3/include/bits/stl_uninitialized.h
+++ b/libstdc++-v3/include/bits/stl_uninitialized.h
@@ -553,9 +553,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
         static void
         __uninit_default(_ForwardIterator __first, _ForwardIterator __last)
         {
-	  typedef typename iterator_traits<_ForwardIterator>::value_type
-	    _ValueType;
-
 	  if (__first == __last)
 	    return;


                 reply	other threads:[~2020-06-27 21:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200627212239.9B6E83840C0F@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).