On 16/04/2019 19.32, Richard Henderson wrote: > On 4/16/19 7:22 AM, Richard Henderson wrote: >> diff --git a/target/riscv/translate.c b/target/riscv/translate.c >> index fb66e886bf..c96c616539 100644 >> --- a/target/riscv/translate.c >> +++ b/target/riscv/translate.c >> @@ -695,6 +695,7 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, >> */ >> #pragma GCC diagnostic push >> #pragma GCC diagnostic ignored "-Wredundant-decls" >> +#pragma GCC diagnostic ignored "-Wtypedef-redefinition" > > Bah. Of course gcc doesn't know this one. And looking closer elsewhere, I > see > we've got a configure test for the pragmas, which I suppose I ought to use.
I wonder whether we should maybe always add "-Wno-typedef-redefinition" in the configure script when we detect clang. All the versions of GCC that we currently support seem to ignore typedef redefinitions anyway...? (I think I've seen that warning with GCC in the past, too, see e.g. commit eeb61d4f8270a6849d9a584fc83da3869b79066d, but that does not seem to be the case anymore with GCC >= 4.8) Thomas