This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Update decls in genemit.c
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Mon, 20 Jul 2015 17:56:29 +0200
- Subject: Re: [PATCH] Update decls in genemit.c
- Authentication-results: sourceware.org; auth=none
- References: <20150720141033 dot GP5101 at redhat dot com>
On Mon, Jul 20, 2015 at 04:10:33PM +0200, Marek Polacek wrote:
> Since r225883, genemit.c's gen_insn/gen_expand/gen_split have a parameter
> of type md_rtx_info *, not rtx, but the function prototypes weren't updated,
> which results into 'declared but never defined' warnings. The following
> trivial patch updates the declarations.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2015-07-20 Marek Polacek <polacek@redhat.com>
>
> * genemit.c (gen_insn, gen_expand, gen_split): Update declaration.
>
> diff --git gcc/genemit.c gcc/genemit.c
> index 2d2fb62..2fa2062 100644
> --- gcc/genemit.c
> +++ gcc/genemit.c
> @@ -51,9 +51,9 @@ struct clobber_ent
>
> static void print_code (RTX_CODE);
> static void gen_exp (rtx, enum rtx_code, char *);
> -static void gen_insn (rtx, int);
> -static void gen_expand (rtx);
> -static void gen_split (rtx);
> +static void gen_insn (md_rtx_info *);
> +static void gen_expand (md_rtx_info *);
> +static void gen_split (md_rtx_info *);
> static void output_add_clobbers (void);
> static void output_added_clobbers_hard_reg_p (void);
> static void gen_rtx_scratch (rtx, enum rtx_code);
After discussing this a bit with Richard S., I'm going to commit
the following:
2015-07-20 Marek Polacek <polacek@redhat.com>
* genemit.c (print_code, gen_exp, gen_insn, gen_expand, gen_split,
output_add_clobbers, output_added_clobbers_hard_reg_p,
gen_rtx_scratch): Remove declarations.
diff --git gcc/genemit.c gcc/genemit.c
index 2d2fb62..a2c474d 100644
--- gcc/genemit.c
+++ gcc/genemit.c
@@ -49,14 +49,6 @@ struct clobber_ent
struct clobber_ent *next;
};
-static void print_code (RTX_CODE);
-static void gen_exp (rtx, enum rtx_code, char *);
-static void gen_insn (rtx, int);
-static void gen_expand (rtx);
-static void gen_split (rtx);
-static void output_add_clobbers (void);
-static void output_added_clobbers_hard_reg_p (void);
-static void gen_rtx_scratch (rtx, enum rtx_code);
static void output_peephole2_scratches (rtx);
Marek