* [Qemu-devel] [PATCH] target/xtensa: Remove duplicate typedef of DisasContext
@ 2018-01-12 13:08 Peter Maydell
2018-01-12 16:01 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2018-01-12 13:08 UTC (permalink / raw)
To: qemu-devel; +Cc: patches, Paolo Bonzini, Max Filippov
Some older versions of gcc complain if a typedef is defined twice:
target/xtensa/translate.c:81: error: redefinition of typedef 'DisasContext'
target/xtensa/cpu.h:339: note: previous declaration of 'DisasContext' was here
Remove the now-redundant typedef from the definition of the struct in
translate.c.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/xtensa/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 4bdfcd2..bec9efc 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -50,7 +50,7 @@
/* is_jmp field values */
#define DISAS_UPDATE DISAS_TARGET_0 /* cpu state was modified dynamically */
-typedef struct DisasContext {
+struct DisasContext {
const XtensaConfig *config;
TranslationBlock *tb;
uint32_t pc;
@@ -78,7 +78,7 @@ typedef struct DisasContext {
uint32_t *raw_arg;
xtensa_insnbuf insnbuf;
xtensa_insnbuf slotbuf;
-} DisasContext;
+};
static TCGv_i32 cpu_pc;
static TCGv_i32 cpu_R[16];
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target/xtensa: Remove duplicate typedef of DisasContext
2018-01-12 13:08 [Qemu-devel] [PATCH] target/xtensa: Remove duplicate typedef of DisasContext Peter Maydell
@ 2018-01-12 16:01 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2018-01-12 16:01 UTC (permalink / raw)
To: QEMU Developers; +Cc: Max Filippov, Paolo Bonzini, patches@linaro.org
On 12 January 2018 at 13:08, Peter Maydell <peter.maydell@linaro.org> wrote:
> Some older versions of gcc complain if a typedef is defined twice:
>
> target/xtensa/translate.c:81: error: redefinition of typedef 'DisasContext'
> target/xtensa/cpu.h:339: note: previous declaration of 'DisasContext' was here
>
> Remove the now-redundant typedef from the definition of the struct in
> translate.c.
>
> Reported-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
...applied to master as a buildfix.
-- PMM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-12 16:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12 13:08 [Qemu-devel] [PATCH] target/xtensa: Remove duplicate typedef of DisasContext Peter Maydell
2018-01-12 16:01 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).