target/xtensa: Remove duplicate typedef of DisasContext
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 12 Jan 2018 13:08:48 +0000 (13:08 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 12 Jan 2018 14:36:41 +0000 (14:36 +0000)
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>
Message-id: 1515762528-22818-1-git-send-email-peter.maydell@linaro.org

target/xtensa/translate.c

index 4bdfcd24d09b104da11631b1a82f2bddda45f032..bec9efc4d86a8175d7f883937a6e0d2f4811500a 100644 (file)
@@ -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];