From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 92B0D3857C69 for ; Thu, 26 Nov 2020 23:02:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 92B0D3857C69 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-tmDeDIoSMcmlbb604hvgIA-1; Thu, 26 Nov 2020 18:02:04 -0500 X-MC-Unique: tmDeDIoSMcmlbb604hvgIA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CEE31107AD34; Thu, 26 Nov 2020 23:02:03 +0000 (UTC) Received: from localhost (unknown [10.33.37.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56D7860C05; Thu, 26 Nov 2020 23:02:03 +0000 (UTC) Date: Thu, 26 Nov 2020 23:02:02 +0000 From: Jonathan Wakely To: David Edelsohn Cc: libstdc++ , gcc-patches@gcc.gnu.org Subject: Re: More new AIX errors Message-ID: <20201126230202.GP1312820@redhat.com> References: <20201126223304.GN1312820@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201126223304.GN1312820@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="LkYZvX65tyO4RZtj" Content-Disposition: inline X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 23:02:08 -0000 --LkYZvX65tyO4RZtj Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On 26/11/20 22:33 +0000, Jonathan Wakely wrote: >On 26/11/20 15:33 -0500, David Edelsohn via Libstdc++ wrote: >>Hi, Jonathan >> >>Thanks for the recent fixes. I still see a few errors that have crept >>in on AIX. All the same: >> >>FAIL: 17_intro/headers/c++2020/all_no_rtti.cc (test for excess errors) >>FAIL: 17_intro/headers/c++2020/all_pedantic_errors.cc (test for excess errors) >>FAIL: 17_intro/headers/c++2020/operator_names.cc (test for excess errors) >>FAIL: 17_intro/headers/c++2020/stdc++.cc (test for excess errors) >>FAIL: 17_intro/headers/c++2020/stdc++_multiple_inclusion.cc (test for >>excess errors) >> >>/tmp/GCC/powerpc-ibm-aix7.2.3.0/libstdc++-v3/include/latch:64: error: >>'notify_all' is not a member of 'std::__atomic_impl' >>/tmp/GCC/powerpc-ibm-aix7.2.3.0/libstdc++-v3/include/latch:75: error: >>'__atomic_wait' is not a member of 'std'; did you mean >>'__atomic_val_t'? >> >>Can you take a look when you have a moment? > >I think that was caused by r11-5436 which added to the >precompiled header , and incorrectly assumes >that the atomic waiting functions are always available. They're not >available for the gthr-single.h multilib on AIX. > >I'm testing the fix now. And here it is. Committed to trunk. --LkYZvX65tyO4RZtj Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit 71988274865bf049c7705ce33350661b75f0af74 Author: Jonathan Wakely Date: Thu Nov 26 21:54:46 2020 libstdc++: Only define std::latch if atomic waiting is available libstdc++-v3/ChangeLog: * include/std/latch: Depend on _GLIBCXX_HAS_GTHREADS and _GLIBCXX_HAVE_LINUX_FUTEX. * include/std/version (__cpp_lib_latch): Define conditionally. diff --git a/libstdc++-v3/include/std/latch b/libstdc++-v3/include/std/latch index 9d9c880a88bd..3af295b4eb43 100644 --- a/libstdc++-v3/include/std/latch +++ b/libstdc++-v3/include/std/latch @@ -27,20 +27,22 @@ */ #ifndef _GLIBCXX_LATCH -#define _GLIBCXX_LATCH +#define _GLIBCXX_LATCH 1 #pragma GCC system_header #if __cplusplus > 201703L -#define __cpp_lib_latch 201907L #include #include +#if defined _GLIBCXX_HAS_GTHREADS || _GLIBCXX_HAVE_LINUX_FUTEX namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#define __cpp_lib_latch 201907L + class latch { public: @@ -87,5 +89,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace +#endif // GTHREADS || LINUX_FUTEX #endif // __cplusplus > 201703L #endif // _GLIBCXX_LATCH diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index cf0454dbaf84..0f2da8a5ddd9 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -216,7 +216,9 @@ #ifdef _GLIBCXX_HAS_GTHREADS # define __cpp_lib_jthread 201911L #endif -#define __cpp_lib_latch 201907L +#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX +# define __cpp_lib_latch 201907L +#endif #define __cpp_lib_list_remove_return_type 201806L #if __cpp_lib_concepts # define __cpp_lib_make_obj_using_allocator 201811L @@ -226,7 +228,7 @@ #if __cpp_lib_concepts # define __cpp_lib_ranges 201911L #endif -#if defined _GLIBCXX_HAS_GTHREADS || _GLIBCXX_HAVE_LINUX_FUTEX +#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX # define __cpp_lib_semaphore 201907L #endif #define __cpp_lib_shift 201806L --LkYZvX65tyO4RZtj--