public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Peter Bergner <bergner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ibm/heads/gcc-10-branch)] libstdc++: Fix warnings with -Wsystem-headers
Date: Thu, 25 Jun 2020 00:35:10 +0000 (GMT)	[thread overview]
Message-ID: <20200625003510.1380C398BC0F@sourceware.org> (raw)

https://gcc.gnu.org/g:50615814f6ffc6f5be0017bc6392939226d0d650

commit 50615814f6ffc6f5be0017bc6392939226d0d650
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Jun 24 12:34:17 2020 +0100

    libstdc++: Fix warnings with -Wsystem-headers
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
            * include/std/charconv (__detail::__to_chars): Avoid
            -Wsign-compare warning.
    
    (cherry picked from commit 25920dd18ad12ea501309b1487366e22f35db631)

Diff:
---
 libstdc++-v3/include/bits/stl_algobase.h | 3 +++
 libstdc++-v3/include/std/charconv        | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index bed61fd9d00..b1546521dfd 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -1952,14 +1952,17 @@ _GLIBCXX_END_NAMESPACE_ALGO
 	  if (__pred(__first))
 	    return __first;
 	  ++__first;
+	  // FALLTHRU
 	case 2:
 	  if (__pred(__first))
 	    return __first;
 	  ++__first;
+	  // FALLTHRU
 	case 1:
 	  if (__pred(__first))
 	    return __first;
 	  ++__first;
+	  // FALLTHRU
 	case 0:
 	default:
 	  return __last;
diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv
index 77a72d40dd0..8fbf64058ee 100644
--- a/libstdc++-v3/include/std/charconv
+++ b/libstdc++-v3/include/std/charconv
@@ -142,7 +142,7 @@ namespace __detail
 	'u', 'v', 'w', 'x', 'y', 'z'
       };
 
-      while (__val >= __base)
+      while (__val >= (unsigned)__base)
 	{
 	  auto const __quo = __val / __base;
 	  auto const __rem = __val % __base;


                 reply	other threads:[~2020-06-25  0:35 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=20200625003510.1380C398BC0F@sourceware.org \
    --to=bergner@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).