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.129.124]) by sourceware.org (Postfix) with ESMTPS id 42F373854148 for ; Fri, 12 May 2023 16:48:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42F373854148 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=1683910131; 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=rmSnitcKBoGpmMNo1HbbJ/DWonORozCKdjcyugIjo3A=; b=CE7HXb25BV7oxA3ShjmOqQapSlqjHzW2Z1NU4pBrITt5crBO74x5gko8PjVEYA78EkUFZh qDF1v3BffhjrzRdfWUUwMWrVbBJjZQONe1aBbxxkyXmhvIXExqGU9YHPiQdnpY057fWwU+ J163EEkPRYwsPkfAHXW+IMdwLOwhS3Q= 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-115-sFqFuTfCPbinkzt8cEkmAQ-1; Fri, 12 May 2023 12:48:50 -0400 X-MC-Unique: sFqFuTfCPbinkzt8cEkmAQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2104F88CC43; Fri, 12 May 2023 16:48:50 +0000 (UTC) Received: from localhost (unknown [10.42.28.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id E07A740C2076; Fri, 12 May 2023 16:48:49 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove redundant dependencies on _GLIBCXX_USE_C99_STDINT_TR1 Date: Fri, 12 May 2023 17:48:49 +0100 Message-Id: <20230512164849.1303313-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 -- We never need to use std::make_unsigned in std::char_traits and std::char_traits because guarantees to provide the types we need, since r9-2028-g8ba7f29e3dd064. Similarly, experimental::source_location can just assume uint_least32_t is defined by . libstdc++-v3/ChangeLog: * include/bits/char_traits.h (char_traits): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1. (char_traits): Likewise. * include/experimental/source_location: Likewise. --- libstdc++-v3/include/bits/char_traits.h | 8 ++------ libstdc++-v3/include/experimental/source_location | 6 ------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h index 68ed827f982..0928137854b 100644 --- a/libstdc++-v3/include/bits/char_traits.h +++ b/libstdc++-v3/include/bits/char_traits.h @@ -762,10 +762,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef char16_t char_type; #ifdef __UINT_LEAST16_TYPE__ typedef __UINT_LEAST16_TYPE__ int_type; -#elif defined _GLIBCXX_USE_C99_STDINT_TR1 - typedef uint_least16_t int_type; #else - typedef make_unsigned::type int_type; + typedef uint_least16_t int_type; #endif #if _GLIBCXX_HOSTED typedef streamoff off_type; @@ -891,10 +889,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef char32_t char_type; #ifdef __UINT_LEAST32_TYPE__ typedef __UINT_LEAST32_TYPE__ int_type; -#elif defined _GLIBCXX_USE_C99_STDINT_TR1 - typedef uint_least32_t int_type; #else - typedef make_unsigned::type int_type; + typedef uint_least32_t int_type; #endif #if _GLIBCXX_HOSTED typedef streamoff off_type; diff --git a/libstdc++-v3/include/experimental/source_location b/libstdc++-v3/include/experimental/source_location index 1dfce7343c6..ee94a36cc43 100644 --- a/libstdc++-v3/include/experimental/source_location +++ b/libstdc++-v3/include/experimental/source_location @@ -44,12 +44,6 @@ inline namespace fundamentals_v2 { struct source_location { -#ifndef _GLIBCXX_USE_C99_STDINT_TR1 - private: - using uint_least32_t = unsigned; - public: -#endif - // 14.1.2, source_location creation static constexpr source_location current(const char* __file = __builtin_FILE(), -- 2.40.1