From: Patrick Palka <ppalka@redhat.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] don't declare header-defined functions both static and inline, pt 2
Date: Mon, 27 Feb 2023 10:13:02 -0500 (EST) [thread overview]
Message-ID: <d1b14386-506e-2834-9d55-e0411cbddbdd@idea> (raw)
In-Reply-To: <20230216134431.1600922-1-ppalka@redhat.com>
On Thu, 16 Feb 2023, Patrick Palka wrote:
> This fixes some header-defined functions that are undesirably declared
> static and weren't caught by the "^static inline" pattern used in the
> previous patch.
>
> 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): Replace static with
> inline.
I went ahead and pushed this since I reckon it's a fairly safe/obvious
follow-up to the main patch
(https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612130.html).
> ---
> 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<typename D>
> -static void
> +void
> gt_pch_nx (hash_table<D> *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;
> --
> 2.39.2.422.gc867e4fa18
>
>
prev parent reply other threads:[~2023-02-27 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 3:37 [PATCH] don't declare header-defined functions both static and inline Patrick Palka
2023-01-31 7:05 ` Richard Biener
2023-01-31 8:42 ` Jakub Jelinek
2023-01-31 9:09 ` Richard Biener
2023-01-31 10:21 ` Eric Botcazou
2023-02-16 13:37 ` Patrick Palka
2023-02-16 13:50 ` Jakub Jelinek
2023-02-16 13:44 ` [PATCH] don't declare header-defined functions both static and inline, pt 2 Patrick Palka
2023-02-27 15:13 ` Patrick Palka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1b14386-506e-2834-9d55-e0411cbddbdd@idea \
--to=ppalka@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).