From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 031A8385B52B; Fri, 12 May 2023 16:48:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 031A8385B52B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683910113; bh=U4ka56SoTnFsIePJfbi9+FPW6qzmEgCt5NQHliP/v38=; h=From:To:Subject:Date:From; b=Q0OAdaHS98qB2o+Ou/ZEQrmOp2mu73LKBXt/fuGCQvQ/EpV/E2MOuFpo2WpckJiG1 6m3g2XJ9jzBVqh9sKWLYkyqXvkF1wBS6QXtAKQurZGYusL999Svux3BG6zUsu6Hed+ VMkKFjcZtzuYgt5Q6Qgvk9U6B8ene4AWgWY/jYI4= 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 r14-798] libstdc++: Remove redundant dependencies on _GLIBCXX_USE_C99_STDINT_TR1 X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 0b6aebf7bbe1256d8d9ace7e4e44c7b032e8592b X-Git-Newrev: 1f973c295b699011acd7d5fcb04bd2bf887da16d Message-Id: <20230512164833.031A8385B52B@sourceware.org> Date: Fri, 12 May 2023 16:48:33 +0000 (GMT) List-Id: https://gcc.gnu.org/g:1f973c295b699011acd7d5fcb04bd2bf887da16d commit r14-798-g1f973c295b699011acd7d5fcb04bd2bf887da16d Author: Jonathan Wakely Date: Fri May 12 14:25:50 2023 +0100 libstdc++: Remove redundant dependencies on _GLIBCXX_USE_C99_STDINT_TR1 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. Diff: --- 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(),