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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8924D385609B for ; Fri, 12 May 2023 16:48:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8924D385609B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683910128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tzJcD+kBJ2WEFmUAXesHoDk4OdM6dU1dW9MAKd8FqeI=; b=K1oVG7Q99s0T0jcbJ+oPy7bCtApfdJ51nxd2AutWFHJtS7l1nUfvvk6zhxjDMnyqpecyCb 6NofXFuB1TjXGTBHhDYHby6j7wtroHZ0F3HKC+mvbyDGAVcCwSc2NXxD9yepVbgA+OaIA9 Ma0d6t+QDGNUTal3Q/7ROGgi98hEipA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-604-QpcicgyRODe4e30BCivs0g-1; Fri, 12 May 2023 12:48:44 -0400 X-MC-Unique: QpcicgyRODe4e30BCivs0g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 93E5480101C; Fri, 12 May 2023 16:48:44 +0000 (UTC) Received: from localhost (unknown [10.42.28.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A71EC15BA0; Fri, 12 May 2023 16:48:44 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Reduce dependency on _GLIBCXX_USE_C99_STDINT_TR1 Date: Fri, 12 May 2023 17:48:43 +0100 Message-Id: <20230512164843.1303299-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Since r9-2028-g8ba7f29e3dd064 we've defined most of unconditionally, so we can do the same for most of the std::atomic aliases such as std::atomic_int_least32_t. The only aliases that need to depend on _GLIBCXX_USE_C99_STDINT_TR1 are the ones for the integer types that are not guaranteed to be defined, e.g. std::atomic_int32_t. libstdc++-v3/ChangeLog: * include/std/atomic (atomic_int_least8_t, atomic_uint_least8_t) (atomic_int_least16_t, atomic_uint_least16_t) (atomic_int_least32_t, atomic_uint_least32_t) (atomic_int_least64_t, atomic_uint_least64_t) (atomic_int_fast16_t, atomic_uint_fast16_t) (atomic_int_fast32_t, atomic_uint_fast32_t) (atomic_int_fast64_t, atomic_uint_fast64_t) (atomic_intmax_t, atomic_uintmax_t): Define unconditionally. * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Adjust. --- libstdc++-v3/include/std/atomic | 5 +---- .../testsuite/29_atomics/headers/stdatomic.h/c_compat.cc | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index 96e87ded864..b502027e4a4 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -1130,7 +1130,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// atomic_uint64_t typedef atomic atomic_uint64_t; - +#endif /// atomic_int_least8_t typedef atomic atomic_int_least8_t; @@ -1180,7 +1180,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// atomic_uint_fast64_t typedef atomic atomic_uint_fast64_t; -#endif /// atomic_intptr_t @@ -1195,13 +1194,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// atomic_ptrdiff_t typedef atomic atomic_ptrdiff_t; -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 /// atomic_intmax_t typedef atomic atomic_intmax_t; /// atomic_uintmax_t typedef atomic atomic_uintmax_t; -#endif // Function definitions, atomic_flag operations. inline bool diff --git a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc index edf19960cbb..8dd7054a997 100644 --- a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc +++ b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc @@ -79,6 +79,7 @@ static_assert(is_same); static_assert(is_same); static_assert(is_same); static_assert(is_same); +#endif static_assert(is_same); static_assert(is_same); static_assert(is_same); @@ -95,13 +96,10 @@ static_assert(is_same); static_assert(is_same); static_assert(is_same); static_assert(is_same); -#endif static_assert(is_same); static_assert(is_same); -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 static_assert(is_same); static_assert(is_same); -#endif #include static_assert(is_same); static_assert(is_same); -- 2.40.1