From patchwork Thu Dec 7 20:57:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 81710 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9ACEE38618ED for ; Thu, 7 Dec 2023 20:57:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 B2C10385840C for ; Thu, 7 Dec 2023 20:57:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2C10385840C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B2C10385840C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701982645; cv=none; b=t+CmXF3Vv3KhHKupitT3t8zqRnEXEZH6kmxfgF2t6QnOk1N08CMR2VSnyPRN35Id4E47i/Ygkr/nMhwCIAzLVFZ3qaPufi73zHarTDeKCLMqGXhLzrk0oZtzHxtc2dZAsO2YU4Vd6DuHHVSCbr4cE0tl60i0xMJClW991Nc8btk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701982645; c=relaxed/simple; bh=DvUOIT0kHeZoGz/wPocHKSv7NtyNsSOwH3/zFAJD8Cc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=G0ykjWrXv4X8QoAJqmZ+pbA+aG2kLPM5CFyAeWziZjPzdPJ8wFcbpRqc7qtUagXa6IpaX+kR4p7WGpotbjcWuZ1mwEkhsxfW0BUyHuxPHzH3hQMOgMJo2HLr+hc3dqlUKuotGryhCjAgKvQY4ae2TWObOsryTamA52gjVzTzWAY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701982644; 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=TzOYk5yg2s7vBWlSsQprbQEo8+JRcZ2A8fnIQfiPR84=; b=gfisL23TdffMkEwMpFgcwyOojU6QGYjjo/X2JVuEcs+cnpfQTut+Nu/EF3dgQD5iwvr5yr 9Ju8HHY3AGQ2W7v6SkycLrygg7qDglmgOyL1DxVquWx/kJCSNu7Pam+YbPRHD/QY+CRls+ qmA6mGJuDj3A5KhIqTriaqZE60Y8PQU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-aJnbQEHXNS2FhBQZgJXolg-1; Thu, 07 Dec 2023 15:57:21 -0500 X-MC-Unique: aJnbQEHXNS2FhBQZgJXolg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 077A384ACA6; Thu, 7 Dec 2023 20:57:21 +0000 (UTC) Received: from localhost (unknown [10.42.28.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id C61F8C15E6C; Thu, 7 Dec 2023 20:57:20 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix misleading typedef name in Date: Thu, 7 Dec 2023 20:57:07 +0000 Message-ID: <20231207205720.950537-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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_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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Tested x86_64-linux. Pushed to trunk. -- >8 -- This local typedef for uintptr_t was accidentally named uint64_t, probably from a careless code completion shortcut. We don't need the typedef at all since it's only used once. Just use __UINTPTR_TYPE__ directly instead. libstdc++-v3/ChangeLog: * include/std/format (_Iter_sink): Remove uint64_t local type. --- libstdc++-v3/include/std/format | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 01f0a58392a..04d03e0ceb7 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -2809,7 +2809,6 @@ namespace __format requires same_as, _CharT> class _Iter_sink<_CharT, _OutIter> : public _Sink<_CharT> { - using uint64_t = __UINTPTR_TYPE__; _OutIter _M_first; iter_difference_t<_OutIter> _M_max = -1; protected: @@ -2883,7 +2882,7 @@ namespace __format return {__ptr, __bytes / sizeof(_CharT)}; #endif // Avoid forming a pointer to a different memory page. - uint64_t __off = reinterpret_cast(__ptr) % 1024; + const auto __off = reinterpret_cast<__UINTPTR_TYPE__>(__ptr) % 1024; __n = (1024 - __off) / sizeof(_CharT); if (__n > 0) [[likely]] return {__ptr, static_cast(__n)};