Message ID | 20190425172636.11128-2-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | target/riscv fixup and reserved argument checks | expand |
On Thu, Apr 25, 2019 at 10:28 AM Richard Henderson <richard.henderson@linaro.org> wrote: > > --- > target/riscv/translate.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) Not sure how this will work with a fixup, but still: Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > > diff --git a/target/riscv/translate.c b/target/riscv/translate.c > index d1f599a92d..009c146e8f 100644 > --- a/target/riscv/translate.c > +++ b/target/riscv/translate.c > @@ -713,12 +713,19 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, > * initially declared by the 32-bit decoder, which results in duplicate > * declaration warnings. Suppress them. > */ > -#pragma GCC diagnostic push > -#pragma GCC diagnostic ignored "-Wredundant-decls" > +#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 "decode_insn16.inc.c" > > -#pragma GCC diagnostic pop > +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE > +# pragma GCC diagnostic pop > +#endif > > static void decode_opc(DisasContext *ctx) > { > -- > 2.17.1 > >
On Thu, 25 Apr 2019 10:26:35 PDT (-0700), richard.henderson@linaro.org wrote: > --- > target/riscv/translate.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/target/riscv/translate.c b/target/riscv/translate.c > index d1f599a92d..009c146e8f 100644 > --- a/target/riscv/translate.c > +++ b/target/riscv/translate.c > @@ -713,12 +713,19 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, > * initially declared by the 32-bit decoder, which results in duplicate > * declaration warnings. Suppress them. > */ > -#pragma GCC diagnostic push > -#pragma GCC diagnostic ignored "-Wredundant-decls" > +#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 "decode_insn16.inc.c" > > -#pragma GCC diagnostic pop > +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE > +# pragma GCC diagnostic pop > +#endif > > static void decode_opc(DisasContext *ctx) > { I've attemeted to fixup the patch on my for-master, let me know if I've screwed something up!
diff --git a/target/riscv/translate.c b/target/riscv/translate.c index d1f599a92d..009c146e8f 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -713,12 +713,19 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, * initially declared by the 32-bit decoder, which results in duplicate * declaration warnings. Suppress them. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wredundant-decls" +#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 "decode_insn16.inc.c" -#pragma GCC diagnostic pop +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +# pragma GCC diagnostic pop +#endif static void decode_opc(DisasContext *ctx) {