| Message ID | 20250320101746.17719-1-tdevries@suse.de |
|---|---|
| State | Committed |
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> 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 E822D3858427 for <patchwork@sourceware.org>; Thu, 20 Mar 2025 10:18:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E822D3858427 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=kA9g1jMY; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=V1hVeTgv; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=J5qCJ5WE; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zChWxABf X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 89EFC3858D26 for <gdb-patches@sourceware.org>; Thu, 20 Mar 2025 10:17:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 89EFC3858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 89EFC3858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742465852; cv=none; b=F07hh+2yiR8l7UDJU36wPxS4bv3yZGBCsds4wkNKqTYgD+pTKocgmCKa6yWbTAfi4OJS7/K5lsXZoGvOFl/uJCtjdT1w9L9CkiKozUV7jOgWPQpJE1Q3dVqj6QZi+7R3HDbjhJUEPvlNt6nXdc1IKFRCGAznB/Kmzk1XiN74iSU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1742465852; c=relaxed/simple; bh=52/N64hl0sg5MDJDKV8F2BJzRK0WxwP6mFN3VGny91g=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=EtqI1iB3udVTvu58SnZkM6+EDS6E3a2HmvhxcGwLSFdl8dEGdvi4IK3FkX2fIULWZT2kQq+Wa1t2NJdwvzt+qfsiQ1Hz4A1IOxDMZw0nZeB0lw5B1zoaNG43Hus1Wz0VuV5sVYRdZ+JNTxAVwzbxRkSFvJnjiMzWhaSuLAOaVzk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89EFC3858D26 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3CAF21F388 for <gdb-patches@sourceware.org>; Thu, 20 Mar 2025 10:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1742465851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FNFIyOdEeBFtUZ4YCLbuy8MyCelSp9GiETir/BHgPI=; b=kA9g1jMYv1WbRvm5CIWYEUXWYAAa00mYng7dMg7n8Pdv22aGMgxW2yOgrAWKeGh05ZuV54 Bdslirnbic+k+HLUZya+i+kaG0efDSoM1cr3tJCoFSaUIpTam1MOFzqEZErBL+HYzftY2H ZXu0iLJbqtYm/4UED0+SNBydp590hbE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1742465851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FNFIyOdEeBFtUZ4YCLbuy8MyCelSp9GiETir/BHgPI=; b=V1hVeTgvhXKGAcecFzfiB/96+G87SXheVCx2NMg7BCiQpzYmDb/yKYmUYI/I7QysPSfDyO x9n9op/pTo7jmDCw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1742465850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FNFIyOdEeBFtUZ4YCLbuy8MyCelSp9GiETir/BHgPI=; b=J5qCJ5WEC0Lg9wGWbCJObgXh53hc2cJ+3HJ8s3UdJijcALokBs9noFfTvMHrH4LP+mHjCc DjrTegDmO313/BDKbH3lG5onrZ0uFEbIcCbY2rHl6GCqfd+zq2iQc6xZjUjH4VhuoE8g/M Zz8GoxH4crSJSs1pn6C7ft4FwyeI4XY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1742465850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FNFIyOdEeBFtUZ4YCLbuy8MyCelSp9GiETir/BHgPI=; b=zChWxABf0uF1sfg7lfqLfXVYarelp8/SlqTjfImWZIcC3yFnp9jYz/UzgJVk9/HGT50ic0 BRfDGsAx1PdND7CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2648513757 for <gdb-patches@sourceware.org>; Thu, 20 Mar 2025 10:17:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MpEJCDrr22dyCAAAD6G6ig (envelope-from <tdevries@suse.de>) for <gdb-patches@sourceware.org>; Thu, 20 Mar 2025 10:17:30 +0000 From: Tom de Vries <tdevries@suse.de> To: gdb-patches@sourceware.org Subject: [pushed] [gdb/build] Fix build with gcc 9 Date: Thu, 20 Mar 2025 11:17:46 +0100 Message-ID: <20250320101746.17719-1-tdevries@suse.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; TO_DN_NONE(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo] X-Spam-Score: -3.30 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
[pushed,gdb/build] Fix build with gcc 9
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 | fail | Patch failed to apply |
| linaro-tcwg-bot/tcwg_gdb_build--master-arm | fail | Patch failed to apply |
Commit Message
Tom de Vries
March 20, 2025, 10:17 a.m. UTC
Since commit a691853148f ("gdb/python: introduce gdbpy_registry"), when
building gdb with gcc 9, I run into:
...
In file included from gdb/varobj.c:38:0:
gdb/python/python-internal.h:1211:47: error: expected ‘;’ before ‘<’ token
using StorageKey = typename registry<O>::key<Storage>;
^
...
due to this code:
...
template <typename Storage>
class gdbpy_registry
{
...
template<typename O>
using StorageKey = typename registry<O>::key<Storage>;
template<typename O>
Storage *get_storage (O *owner, const StorageKey<O> &key) const
{ ... }
...
}
...
As an experiment, I tried out eliminating the type alias:
...
template<typename O>
Storage *get_storage (O *owner,
const typename registry<O>::key<Storage> &key) const
{ ... }
...
and got instead:
...
In file included from gdb/varobj.c:38:0:
gdb/python/python-internal.h:1211:63: error: non-template ‘key’ used as template
Storage *get_storage (O *owner,
const typename registry<O>::key<Storage> &key) const
^~~
gdb/python/python-internal.h:1211:63: note: use ‘registry<O>::template key’ \
to indicate that it is a template
...
Following that suggestion, I tried:
...
template<typename O>
Storage *
get_storage (O *owner,
const typename registry<O>::template key<Storage> &key) const
{ ... }
...
which fixed the problem.
Likewise, adding the template keyword in the type alias fixes the original
problem, so fix it like that.
Tested on x86_64-linux.
---
gdb/python/python-internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 2084a5debfa7ab82e94baecdb66695eb1627817e
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 5e6707346f9..3f1a2067fdb 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -1208,7 +1208,7 @@ class gdbpy_registry private: template<typename O> - using StorageKey = typename registry<O>::key<Storage>; + using StorageKey = typename registry<O>::template key<Storage>; template<typename O> Storage *get_storage (O *owner, const StorageKey<O> &key) const