From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aTvNIJexsWnKCSQAWB0awg (envelope-from ) for ; Wed, 11 Mar 2026 14:16:55 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KPuZsBxm; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7E6ED1E0DD; Wed, 11 Mar 2026 14:16:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 05FE61E089 for ; Wed, 11 Mar 2026 14:16:55 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id E8B014BB5883 for ; Wed, 11 Mar 2026 18:16:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8B014BB5883 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=KPuZsBxm Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id 18EE54BA23C5 for ; Wed, 11 Mar 2026 18:16:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 18EE54BA23C5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 18EE54BA23C5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773252982; cv=none; b=FKHaSC8dF6BjD6pusIIgYmqAT7bfy3ZosIvOnjjBRCy7xAQAVzsbACKN6mGEH5MlOae0LX5XWMCvCZkGWrb2KYxr788zBsP8G/kbAuuDUzVOZVdq4hKyLSKsyJ3AzQtih4dQpqD+96hpP9YZA/83lGwPjkFgYtivc0GsUVSNTyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773252982; c=relaxed/simple; bh=MLBAhHQIJ6kw4Yc2LIVX/gARXmGiL1mq/4nTYAbMt4I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uCvUzVjZDuwAS1XIRU5Ktzx1bM/PD81UPzjC3ems4i1g5KbYTXLjTp1ls9jvm4//NFjY+nj2WNA+pIJvf8bQWn+6bVe0ltLmtnTtcVhmQLugSUVEAsBqU5xYoiRb9Lk0Yez4MbNz/CmKoi3L5ZnIucFNF6EwXzXZssoHWM8FmKg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18EE54BA23C5 Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id 0M25wqLFnaPqL0O6XwtNNd; Wed, 11 Mar 2026 18:16:21 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 0O6Ww5zSxh8QW0O6WwOWnM; Wed, 11 Mar 2026 18:16:20 +0000 X-Authority-Analysis: v=2.4 cv=Mcdsu4/f c=1 sm=1 tr=0 ts=69b1b174 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Yq5XynenixoA:10 a=ItBw4LHWJt0A:10 a=7CQSdrXTAAAA:8 a=zstS-IiYAAAA:8 a=KIkiuk6yX2AecDB1_UMA:9 a=a-qgeE7W1pNrGK8U0ZQC:22 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Im/3bRie+f2B2aO+lUIyTz6Z7kyaIGp/fPiB0MYy340=; b=KPuZsBxmjssNMmEWyPWeq5G8D6 PXEFiUpXvYvX8wsslDzYdajP677KoQhD3yybCF/Fk4dNpud8+LLwbrKSg1n8p25X0iHLkXPIapdoe S1R4KexlH9OM6sIV8Cg/twX+j; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:57256 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w0O6W-00000001FFO-0LKA; Wed, 11 Mar 2026 12:16:20 -0600 From: Tom Tromey To: Matthieu Longo Cc: Simon Marchi , Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v3 1/7] gdb: introduce rgb_color type to simplify existing code In-Reply-To: <6709ef98-2ff2-47d7-b292-9c6b02f5fc05@arm.com> (Matthieu Longo's message of "Wed, 11 Mar 2026 17:55:50 +0000") References: <20260309175624.236491-1-matthieu.longo@arm.com> <20260309175624.236491-2-matthieu.longo@arm.com> <87eclsx0xn.fsf@tromey.com> <0762aa68-ad5c-4edc-b1ad-72109e613301@simark.ca> <6709ef98-2ff2-47d7-b292-9c6b02f5fc05@arm.com> X-Attribution: Tom Date: Wed, 11 Mar 2026 12:16:18 -0600 Message-ID: <87fr66teod.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1w0O6W-00000001FFO-0LKA X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:57256 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPJENtIiR845IPYAz2nkm7vdP8WZlhnzFfWs8eJowbRbvJdk8XhNsTvPLOWNHNiDiWqejDc45gm2TGUy5cMVd7PRh8c3iQNGHUhGwpz5+f55Q4WRj0ig ToJFowP2fXG4zW/9GKyYpghN590khjAPyMyuGIstpbyXrLL4du6RdRqgho81zyu6dKyXVTwCxatqkj1rU+BD5LcfLpFkL3u9Hkg= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> Matthieu Longo writes: >> It seems to be because an rgb_color can be implicitly converted to a >> `uint8_t *`, which can be subscripted, but also has an operator[]. >> Not sure why the uint8_t* operator is needed, First, sorry about that, I missed the implicit conversion in my review. While I think those can be ok sometimes, most of the times they aren't. > rgb = palette_8colors[m_value]; >> but it compiles fine here if I remove it. If really needed, I think that an explicit method >> (`.data()`) would be preferable, to avoid unwanted conversions. > I locally tested the removal of this uint8_t* operator, and the code compiles fine. > Do you want me to publish a patch for this ? Or will you fix it ? Please send it as a patch with an appropriate commit message. It's pre-approved by me. Though TBH this could probably also be obvious considering it's a one-line removal and fixes the build. You can add the tag - Approved-By: Tom Tromey thank you, Tom