From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 850973A77C13; Wed, 28 Apr 2021 11:56:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 850973A77C13 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 r11-8316] libstdc++: Add missing noexcept on std::thread member function [PR 100298] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 100cc845cda3843e87f152f845b11b70fee3d7bc X-Git-Newrev: aae5106525d850c5f3ae8265374ead16c5e0a9b7 Message-Id: <20210428115641.850973A77C13@sourceware.org> Date: Wed, 28 Apr 2021 11:56:41 +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, 28 Apr 2021 11:56:41 -0000 https://gcc.gnu.org/g:aae5106525d850c5f3ae8265374ead16c5e0a9b7 commit r11-8316-gaae5106525d850c5f3ae8265374ead16c5e0a9b7 Author: Jonathan Wakely Date: Wed Apr 28 12:45:49 2021 +0100 libstdc++: Add missing noexcept on std::thread member function [PR 100298] The new inline definition of std::thread::hardware_concurrency() for non-gthreads targets is missing the noexcept-specifier that is on the declaration. libstdc++-v3/ChangeLog: PR libstdc++/100298 * include/bits/std_thread.h (thread::hardware_concurrency): Add missing noexcept to inline definition for non-gthreads targets. (cherry picked from commit 5cc28000cfcc219fb4c45dbc5388ec05109049af) Diff: --- libstdc++-v3/include/bits/std_thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/std_thread.h b/libstdc++-v3/include/bits/std_thread.h index 70cb31a5331..2a500bf1777 100644 --- a/libstdc++-v3/include/bits/std_thread.h +++ b/libstdc++-v3/include/bits/std_thread.h @@ -270,7 +270,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifndef _GLIBCXX_HAS_GTHREADS inline void thread::join() { std::__throw_system_error(EINVAL); } inline void thread::detach() { std::__throw_system_error(EINVAL); } - inline unsigned int thread::hardware_concurrency() { return 0; } + inline unsigned int thread::hardware_concurrency() noexcept { return 0; } #endif inline void