From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id EB04C385E830; Wed, 24 Jun 2020 23:02:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB04C385E830 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593039737; bh=t8dC6Vue58CbkJNe1TTUrbGfYpk2t2WqGdSvBAvN1GA=; h=From:To:Subject:Date:From; b=ZLXJ6B5GOzcMC9ag9wUum9kUfHe6uM202JmTkZu7NpXDmHiX26KeJF3hTGxtZqO+B 6qxVFr7rzbvBFUXWQX2xuN//BUfqaQ2jC3lbLmM1xhmPUxS3eMOekJoJF/kN+kCAoG Ea+qBbOyZNjNrTDrKwL0YxQ8OmInmT8ZkNiyVEo4= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/c++-coroutines] libstdc++: Fix warnings with -Wsystem-headers X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/devel/c++-coroutines X-Git-Oldrev: be50843754b4c4d47f0d628a84b3dbf2a4145a43 X-Git-Newrev: 25920dd18ad12ea501309b1487366e22f35db631 Message-Id: <20200624230217.EB04C385E830@sourceware.org> Date: Wed, 24 Jun 2020 23:02:17 +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: Wed, 24 Jun 2020 23:02:18 -0000 https://gcc.gnu.org/g:25920dd18ad12ea501309b1487366e22f35db631 commit 25920dd18ad12ea501309b1487366e22f35db631 Author: Jonathan Wakely 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. 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 4fc8850d707..ff5b4505a08 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -2092,14 +2092,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;