[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/67] target/arm: Add stubs for aa32 decodetree
From: |
Aleksandar Markovic |
Subject: |
Re: [Qemu-devel] [PATCH 11/67] target/arm: Add stubs for aa32 decodetree |
Date: |
Fri, 9 Aug 2019 12:31:09 +0200 |
On Thu, Aug 8, 2019 at 5:43 PM Richard Henderson <
address@hidden> wrote:
> On 8/8/19 4:41 AM, Aleksandar Markovic wrote:
> > +/*
> > + * Include the generated decoders.
> > + * Note that the T32 decoder reuses some of the trans_* functions
> > + * initially declared by the A32 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
> > +
> >
> >
> > This looks more like a "band aid" solution rather than the right one.
>
> What would the "right" solution be, would you say?
>
>
The right (without quotation marks) solution is not to generate the code
that generates compiler complaints.
However, I do not say that this is a stopping issue for this series.
Perhaps at some time in future you can think of ways that would achieve not
resorting to pragmas. Obviously, in this case, decodetree-generated code
shows that it is inferior to human-generated code. Still, for now, go ahead
with this patch, as far as I am concerned.
Yours,
Aleksandar
> A couple of days ago Phil suggested moving these pragmas into the generated
> code, so that this need not be done by hand in the several targets that use
> multiple decoders. That sounds reasonable to me.
>
>
> r~
>