From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1888) id 2BC183850858; Mon, 27 Feb 2023 15:12:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BC183850858 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677510776; bh=MbG0EA+gJ/W1vqovf8UfDRC3Vy8UBVoCyQ6dvVGVTLg=; h=From:To:Subject:Date:From; b=HAQBdABWcRj9qpD7pFVNuBBV8/Cg7vdEi2A+M5fYiR+TT23CA1aRXCoEcZA9ILMI1 4ubfpMYIpOYyvCnmGzkc8EMwhfuD8MJfxO+x5szisd/jRO4GnQ52oq4UP5HTrdQ5ZI 6ki1Ic2xGREFUu2q/EdZEOukp0IEEyTXAIzXM7wc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Patrick Palka To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6358] don't declare header-defined functions both static and inline, cont. X-Act-Checkin: gcc X-Git-Author: Patrick Palka X-Git-Refname: refs/heads/master X-Git-Oldrev: dfa85beebfbc2f879d30d3918f634feabc851782 X-Git-Newrev: b800f80b9c866df5ecaff744149ea695c0e24718 Message-Id: <20230227151256.2BC183850858@sourceware.org> Date: Mon, 27 Feb 2023 15:12:56 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b800f80b9c866df5ecaff744149ea695c0e24718 commit r13-6358-gb800f80b9c866df5ecaff744149ea695c0e24718 Author: Patrick Palka Date: Mon Feb 27 10:12:25 2023 -0500 don't declare header-defined functions both static and inline, cont. This fixes some header-defined functions that are undesirably declared static and weren't caught by the "^static inline" pattern used for the main patch r13-6096-gcb3e0eac262e55. gcc/ChangeLog: * hash-table.h (gt_pch_nx(hash_table)): Remove static. * lra-int.h (lra_change_class): Likewise. * recog.h (which_op_alt): Likewise. * sel-sched-ir.h (sel_bb_empty_or_nop_p): Declare inline instead of static. Diff: --- gcc/hash-table.h | 2 +- gcc/lra-int.h | 2 +- gcc/recog.h | 2 +- gcc/sel-sched-ir.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/hash-table.h b/gcc/hash-table.h index 3f87ec06f37..c0c6e1cd83d 100644 --- a/gcc/hash-table.h +++ b/gcc/hash-table.h @@ -1275,7 +1275,7 @@ hashtab_entry_note_pointers (void *obj, void *h, gt_pointer_operator op, } template -static void +void gt_pch_nx (hash_table *h) { h->check_complete_insertion (); diff --git a/gcc/lra-int.h b/gcc/lra-int.h index 73f8eb004b0..a400a0f85e2 100644 --- a/gcc/lra-int.h +++ b/gcc/lra-int.h @@ -428,7 +428,7 @@ lra_get_regno_hard_regno (int regno) /* Change class of pseudo REGNO to NEW_CLASS. Print info about it using TITLE. Output a new line if NL_P. */ -static void inline +inline void lra_change_class (int regno, enum reg_class new_class, const char *title, bool nl_p) { diff --git a/gcc/recog.h b/gcc/recog.h index 764fa90afde..539a27c3edf 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -382,7 +382,7 @@ extern const operand_alternative *recog_op_alt; on operand OP of the current instruction alternative (which_alternative). Only valid after calling preprocess_constraints and constrain_operands. */ -inline static const operand_alternative * +inline const operand_alternative * which_op_alt () { gcc_checking_assert (IN_RANGE (which_alternative, 0, diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index 7034a1ab06c..0e87134c6db 100644 --- a/gcc/sel-sched-ir.h +++ b/gcc/sel-sched-ir.h @@ -1096,7 +1096,7 @@ get_loop_exit_edges_unique_dests (const class loop *loop) return edges; } -static bool +inline bool sel_bb_empty_or_nop_p (basic_block bb) { insn_t first = sel_bb_head (bb), last;