From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oVGrNfbmK2q7DwMAWB0awg (envelope-from ) for ; Fri, 12 Jun 2026 07:01:10 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=dEaKRIei; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D78601E024; Fri, 12 Jun 2026 07:01:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2 autolearn=unavailable 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 50F5D1E024 for ; Fri, 12 Jun 2026 07:01:10 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5B934B99F40 for ; Fri, 12 Jun 2026 11:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5B934B99F40 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=dEaKRIei Received: from CH5PR02CU005.outbound.protection.outlook.com (mail-northcentralusazlp170120005.outbound.protection.outlook.com [IPv6:2a01:111:f403:c105::5]) by sourceware.org (Postfix) with ESMTPS id D70F34BA23C3 for ; Fri, 12 Jun 2026 11:00:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D70F34BA23C3 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D70F34BA23C3 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c105::5 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1781262042; cv=pass; b=bNqGggNZoy7QziJY9c2L4C9PNPL9FipfTclgmlaSTYIUFzh1G5JOyAh5ASExnmljVP8kiUsNIrZQ62ySBRzW2jUzBqXImtNL4A2Hkke/3l8bjqpQ6j6cTFAEHEzLo2184Wdz9qlrfqi2L3jvhfBuYly3nTj1iPaYjpwdXxjMBAA= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1781262042; c=relaxed/simple; bh=7yYTfpfwY8dzcOTXG/sF3PC2b0lHWqJnlozMEGkTfyI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=sJBZO4y86zPR7lhr4nxX1tZdLaWeC3nLq/Iquyf24dg385oJ4/xIxwZDTJH/CCtFxw2g0glzDp/pbZeNAhbyWAuFK8/7GGCt/5GQYdfI/TReLgSdPCcopZzZV1+O+rnPLEg/7K4C2tkhxBzJXdAaUKnwxClfFu2rZYH1WID6U5c= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=dEaKRIei DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D70F34BA23C3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=f5nQAKkAnaxDGFs53omyknZl+gYFz1qsb4tMSIvnU1COurq3H7LTjavwZ9hHqRFc+/7BaG+WjRrFblH/bCBr18Iic36sn7HW9qNIW51fR0goqD1kVzqtHyVTtwTU+rpuxLyMMrtFcT0vkRge6sHB/ULKNVtNu57dHJmNKzQZciBSg4cNbujCKXVd/qnezke/Mx14sUsvXhAR9fVyF2TjOWVHGWxZwWFYm8Txj07ga8F7AyXr7/dhH9F1uHF7aX7qS4vwu8IM0jq1GjLNTw0gbhMF9W7ISALAa+tw+VhI/tw+CBBl+vqn75ykAPdzUS3OybyWGJpIPvUr04f+MHVZCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=d22vh9UfGl+9D1YppCBNlJeihO7UoK2aR9OXcJkdvuA=; b=H7mG1sKuwivZY8JcKKfikZGF2fbJm7r+DhcWA3ljEYjql2e83/yeyz96mAZxZxH1LaF8gjTqGZ4ay4BczgrlRIjrgtZBqFkmRg2rn8Z3hK6fkaG3GQQl2h+ggw9XwwEILlGyWNNynQvXtWAekoWsmob+JX6QYzESj3DIHBXHmkN1juvR3VQ0fyCxMEKYhJ984buyFjrvmDxxJTIIMaRf1dg4gbtG8hBV18LyCRf9CGrc2imSVv/jbLdiT8N9TcvjaYD7JNR3UvQarp7UoOL/gt4Q3F2g5lI1hdHAjXeXhWrH6ySkCsaMxUvuYMDfHwownskG+V9KhLKVyG03QEWV2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d22vh9UfGl+9D1YppCBNlJeihO7UoK2aR9OXcJkdvuA=; b=dEaKRIeiuu1vEkAJ/hhCNtaM43rAx6dbGBg7ACXfN2QyK2aN8M5jPFVFW2Naxfv5iZz5gkH+Yi4xaax7fENiZnG2uf1SdHrohrs7I18po3vLSfJvEuKwAZWjxz/9uzak+Zj/KBlu5cq8oifAoTUeadDoS4Njh9cPgCyHquOaH2s= Received: from SA0PR11CA0093.namprd11.prod.outlook.com (2603:10b6:806:d1::8) by SJ1PR12MB6172.namprd12.prod.outlook.com (2603:10b6:a03:459::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.113.14; Fri, 12 Jun 2026 11:00:33 +0000 Received: from SN1PEPF000397B3.namprd05.prod.outlook.com (2603:10b6:806:d1:cafe::53) by SA0PR11CA0093.outlook.office365.com (2603:10b6:806:d1::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.113.15 via Frontend Transport; Fri, 12 Jun 2026 11:00:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SN1PEPF000397B3.mail.protection.outlook.com (10.167.248.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.113.7 via Frontend Transport; Fri, 12 Jun 2026 11:00:32 +0000 Received: from khazad-dum (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 12 Jun 2026 06:00:29 -0500 Date: Fri, 12 Jun 2026 12:00:21 +0100 From: Lancelot SIX To: Tom de Vries CC: Andrew Burgess , Tom Tromey , Simon Marchi , Subject: Re: [PATCH] [gdb] Use using instead of typedef Message-ID: References: <20260609162257.1674992-1-tdevries@suse.de> <87pl1zfymw.fsf@tromey.com> <871peeqtsi.fsf@redhat.com> <9b6adbb6-7d5c-4125-a77a-dfd393766beb@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9b6adbb6-7d5c-4125-a77a-dfd393766beb@suse.de> X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000397B3:EE_|SJ1PR12MB6172:EE_ X-MS-Office365-Filtering-Correlation-Id: 1de769c8-f598-4fdd-c604-08dec871d2c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|23010399003|36860700016|376014|18002099003|22082099003|4143699003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: ipIMCS4mLlrW/MPMMK0v5WIyiL1V2T7xOqZHmTdAJwaS7qxu9Vwtc9SSnQMTO7mxG+y1+bOlQf9g8hTE6goKJINaNmNGNttGuzPxI15bYm722l/GJbdcB/bzZiixPqeeQXIsjRRt4ocSrErdruPUd3p1Z1lQUONYmr8H056bklbaoDWYlTbxOlIndJHuqQ4juuZYkVjUJUNby8YDPCrGb08sPws5h0gGM0+AHNYNtc6uSZrsvwVjEqNRMSiLwTc30M3byWNrPCar+zyvDymPIgRmxwBCEXCdqS/qnEG6PZVFCrlS+zSNq2PRQTEJv1twDi2Xb6/yVDN/ESe3iVm5lcv9DMDRe9rB0B1x73+vGWLPMIx8j+ZRMANSVl7bwlw9Kbb6do6DgKMZgD82rNse09WGv/KMsNK8pmz8oXm/mYRvxic98oAxRk2pfZpwb7jfHPg/lt7cecKS2d7I+v2wFvKVXmNpFk+AaBGM3Vwb1rqG2Po1B/N8OwuRmeFJCUbgabGEo/KnB2jSmW0HowPwk3ltN3FHKWT+RvN2PfVICeyLbUBeXL9X2G3GQ2FMHgsRnaXBrtDP/UOyegv8vqhJoavjaw3UT4qtrRM+7cc0B+Bs3slCKxaDbmE4K1JUbTqJqAqcz/pcORfjurZkcc5cIxDgFP2ltYUZv+fngrIZtG8V7HByV+/fT5OJRqjEchNsCFsxbJwmOnPckMqq75CJjFMtOqnIEwzb1uffQ8PU9OQ= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(23010399003)(36860700016)(376014)(18002099003)(22082099003)(4143699003)(56012099006)(11063799006); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Rgwy2wJaTaX+J1c5+w5824Gt5ZFxnfrYR+zben955HiDJ4IzAXfAdpmU+8jmHOIEP0cr7yrvayBmzzbydgIygyePq+X9qou4iudgJxrAmA2V4rrcoPC2vyJlUKyUWBfHI0FfeCU/Zf3wYlP+qntj6nYtwmX5nQGdKBOgfzM9cA6TeKFISVJI6cZPDLnKh/Nw2fWyrirlROlMvJzm/JA0Q2Dz8jjKu8QOOI4Lhc3WPdwLYrh5sWcJgsGIj34w9NCcSgG3bgSJ03zd18j0+N+Xz88AjBuKnwutKDwK2n4jfGJZBGlE5BsT1E5VRMMe6K2Q3LVibmwVdQH9kigGqbvcHj8VGL1xsXvUi+wMYPay4hKv7eBEGxJQLf/hAp/Gl2NE5495vlDARLB4lQkXucMMXApyM4HMltCAxZSLBoArIXecPgDRraHK9384Mt+JPBqk X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2026 11:00:32.5691 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1de769c8-f598-4fdd-c604-08dec871d2c8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000397B3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6172 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 On Thu, Jun 11, 2026 at 08:57:48AM +0200, Tom de Vries wrote: > On 6/10/26 5:50 PM, Andrew Burgess wrote: > > Tom Tromey writes: > > > > > > > > > > "Tom" == Tom de Vries writes: > > > > > > Tom> After commit 1eed06ae51d ("[gdbsupport] Use using instead of typedef in > > > Tom> next_iterator") I wondered if I could do something similar using sed. > > > > > > First of all, thanks for doing this. > > > > > > I don't know how anyone else feels but I normally find 'using' simpler > > > to understand, I suppose because I don't need to try to decode the right > > > hand side to find the name being defined -- it's right there before the > > > '='. > > > > > > So, I am in favor of this patch. I'm going to approve it but I think > > > you should wait for a bit before checking it in, in case someone wants > > > to object. > > > > I also think this is a good idea. > > > > +1 > > > > Thanks all for the upvotes. I've pushed this. > > Thanks, > - Toma Hi Tom, FYI when building with clang on ubuntu (clang 18.1.3), I see the following failure: ../../gdb/nat/amd64-linux-siginfo.c:610:16: error: static assertion failed due to requirement 'sizeof(compat_x32_siginfo_t) == 128' 610 | static_assert (sizeof (compat_x32_siginfo_t) == GDB_SI_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../gdb/nat/amd64-linux-siginfo.c:610:46: note: expression evaluates to '136 == 128' 610 | static_assert (sizeof (compat_x32_siginfo_t) == GDB_SI_SIZE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ I traced this back to this part of your patch: --- a/gdb/nat/amd64-linux-siginfo.c +++ b/gdb/nat/amd64-linux-siginfo.c @@ -203,7 +203,7 @@ struct compat_siginfo_t }; /* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes. */ -typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t; +using compat_x32_clock_t = long __attribute__ ((__aligned__ (4))); struct __attribute__ ((__aligned__ (8))) compat_x32_siginfo_t { I do not think this part is wrong, it seems that clang miss-behaves and drops the attribute. Should we keep typedef just for this case just to keep compatibility with other compilers? Best, Lancelot. > > > > Thanks, > > Andrew > > >