From 8767d64b662ecaeb4d3f49409b967de2522a8ae8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 18 Nov 2019 21:22:06 -0500 Subject: [PATCH] target/riscv: Remove redundant declaration pragmas These are now generated by decodetree itself. Backports commit 59a3a1c0c211640e18b058a1b0444154c4eb6f99 from qemu --- qemu/target/riscv/translate.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/qemu/target/riscv/translate.c b/qemu/target/riscv/translate.c index c0a1d180..df9eae4f 100644 --- a/qemu/target/riscv/translate.c +++ b/qemu/target/riscv/translate.c @@ -737,26 +737,9 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, #include "insn_trans/trans_rvd.inc.c" #include "insn_trans/trans_privileged.inc.c" -/* - * Auto-generated decoder. - * Note that the 16-bit decoder reuses some of the trans_* functions - * initially declared by the 32-bit decoder, which results in duplicate - * declaration warnings. Suppress them. - */ -#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wredundant-decls" -# ifdef __clang__ -# pragma GCC diagnostic ignored "-Wtypedef-redefinition" -# endif -#endif - +/* Include the auto-generated decoder for 16 bit insn */ #include "decode_insn16.inc.c" -#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE -# pragma GCC diagnostic pop -#endif - static void decode_opc(DisasContext *ctx) { /* check for compressed insn */