]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
don't declare header-defined functions both static and inline, cont.
authorPatrick Palka <ppalka@redhat.com>
Mon, 27 Feb 2023 15:12:25 +0000 (10:12 -0500)
committerPatrick Palka <ppalka@redhat.com>
Mon, 27 Feb 2023 15:12:25 +0000 (10:12 -0500)
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<D>)): 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.

gcc/hash-table.h
gcc/lra-int.h
gcc/recog.h
gcc/sel-sched-ir.h

index 3f87ec06f37a7264e2d46730586c484b2c3b3160..c0c6e1cd83d59b8ae54d79e0c41f20294bcb3283 100644 (file)
@@ -1275,7 +1275,7 @@ hashtab_entry_note_pointers (void *obj, void *h, gt_pointer_operator op,
 }
 
 template<typename D>
-static void
+void
 gt_pch_nx (hash_table<D> *h)
 {
   h->check_complete_insertion ();
index 73f8eb004b02d1532b25fbbc1bcd99b2dbb6d437..a400a0f85e291d961c9fa2f64cc3425472245843 100644 (file)
@@ -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)
 {
index 764fa90afde2e7eed688b7fe4a85cac98d9e01ea..539a27c3edf415ba221a64dfa4877ed1c5c0dee3 100644 (file)
@@ -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,
index 7034a1ab06c1f295a12b2f3121e0450924898783..0e87134c6db1e19ffc555fda5732b0dba7fd3645 100644 (file)
@@ -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;