From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gbdwJUITuGliEiwAWB0awg (envelope-from ) for ; Mon, 16 Mar 2026 10:27:14 -0400 Received: by simark.ca (Postfix, from userid 112) id 9679B1E08C; Mon, 16 Mar 2026 10:27:14 -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.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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 269FE1E08C for ; Mon, 16 Mar 2026 10:27:14 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id B35B24B196B4 for ; Mon, 16 Mar 2026 14:27:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B35B24B196B4 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0A1994B9DB6E for ; Mon, 16 Mar 2026 14:26:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A1994B9DB6E Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A1994B9DB6E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773671211; cv=none; b=Ame03ibe0/8EBgDZZ8MEtL20+OmMIevjvHkyozJanFsP++lNq0Vln/+HnDBnLjA441iJqn/rIU8bmlEreD/nT7Rfm64eNngEJdvaOwodHBWdcRqISShuBVt13Kya4jXM7cEsj84D3nE18zjm8TNHolby2f350gOBtD8rK35Hylc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773671211; c=relaxed/simple; bh=FgmJ59KjOJmzOTv9P96fqzRAeuSkUrIsVo4bCV6rVSE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=QYKUynbf6DumPGRd7hdQVMwgKe/6H/6ufv89gR3ZoEpwboajXMzr4dphozwBxjsJPV4VPlquZFYYyni2g9i1BD8PHqaa4jVQCdwdIylobtwkwMrLDSIg7lix/mJfBsv+oME5sp1UePLqRYo+d532hrXpj3eiGNfCgLhb0eAHjI4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A1994B9DB6E Received: by simark.ca (Postfix) id E1F5C1E0A2; Mon, 16 Mar 2026 10:26:47 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/6] gdb: remove INIT_NONE_SPECIFIC Date: Mon, 16 Mar 2026 10:25:18 -0400 Message-ID: <20260316142645.26877-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260316142645.26877-1-simon.marchi@efficios.com> References: <20260316142645.26877-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Simon Marchi This macro seems unnecessary. It is only used right after allocating a new type, and it only sets some fields to 0, which is the default state of a struct type anyway. Change-Id: I9dab6825b07875964505c387daf5f6b1e12c8144 --- gdb/ada-lang.c | 5 ----- gdb/gdbtypes.h | 4 ---- 2 files changed, 9 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 908b33d9c72a..7784f8841318 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -7699,7 +7699,6 @@ empty_record (struct type *templ) struct type *type = type_allocator (templ).new_type (); type->set_code (TYPE_CODE_STRUCT); - INIT_NONE_SPECIFIC (type); type->set_name (""); type->set_length (0); return type; @@ -7754,7 +7753,6 @@ ada_template_to_fixed_record_type_1 (struct type *type, rtype = type_allocator (type).new_type (); rtype->set_code (TYPE_CODE_STRUCT); - INIT_NONE_SPECIFIC (rtype); rtype->alloc_fields (nfields); rtype->set_name (ada_type_name (type)); rtype->set_is_fixed_instance (true); @@ -8006,8 +8004,6 @@ template_to_static_fixed_type (struct type *type0) type = type_allocator (type0).new_type (); type0->set_target_type (type); type->set_code (type0->code ()); - INIT_NONE_SPECIFIC (type); - type->copy_fields (type0); type->set_name (ada_type_name (type0)); @@ -8053,7 +8049,6 @@ to_record_with_fixed_variant_part (struct type *type, const gdb_byte *valaddr, rtype = type_allocator (type).new_type (); rtype->set_code (TYPE_CODE_STRUCT); - INIT_NONE_SPECIFIC (rtype); rtype->copy_fields (type); rtype->set_name (ada_type_name (type)); diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index fae89cd2474d..3917b40e3660 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1865,10 +1865,6 @@ extern void allocate_cplus_struct_type (struct type *); (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF \ && TYPE_RAW_CPLUS_SPECIFIC (type) != &cplus_struct_default) -#define INIT_NONE_SPECIFIC(type) \ - (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_NONE, \ - TYPE_MAIN_TYPE (type)->type_specific = {}) - extern const struct gnat_aux_type gnat_aux_default; extern void allocate_gnat_aux_type (struct type *); -- 2.53.0