accel/tcg: Suppress compiler warning with flag -Wclobbered
PATCH 1/1 accel/tcg: Suppress compiler warning with flag -Wclobbered
At least some versions of gcc show a warning when compiler flag -Wclobbered is used (tested with gcc on Debian bookworm i386 and with cross gcc for Windows on Debian bullseye).
Signed-off-by Stefan Weil <[email protected]>
--- accel/tcg/translate-all.c | 3 +++ 1 file changed, 3 insertions(+)
accel/tcg/translate-all.c +3 -0
@@ -743,6 +743,8 @@ void page_collection_unlock(struct page_collection *set)#endif /* !CONFIG_USER_ONLY */ /* Called with mmap_lock held for user mode emulation. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclobbered"TranslationBlock *tb_gen_code (CPUState *cpu,target_ulong pc,target_ulong cs_base,uint32_t flags,int cflags)
@@ -1020,6 +1022,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, }return tb; } +#pragma GCC diagnostic pop/* user-mode: call with mmap_lock held */ void tb_check_watchpoint (CPUState *cpu,uintptr_t retaddr)
Signature · 1 line
2.30.2
Quoted 23 lines · Stefan Weil
At least some versions of gcc show a warning when compiler flag -Wclobbered is used (tested with gcc on Debian bookworm i386 and with cross gcc for Windows on Debian bullseye).
Signed-off-by Stefan Weil <[email protected]>--- accel/tcg/translate-all.c | 3 +++ 1 file changed, 3 insertions(+)accel/tcg/translate-all.c +2
-0@@ -743,6 +743,8 @@ void page_collection_unlock(struct page_collection *set)#endif /* !CONFIG_USER_ONLY */ /* Called with mmap_lock held for user mode emulation. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclobbered"TranslationBlock *tb_gen_code (CPUState *cpu,target_ulong pc,target_ulong cs_base,uint32_t flags,int cflags)
accel/tcg/translate-all.c TranslationBlock *tb_gen_code(CPUState *cpu, · line 1025
Quoted 4 lines
accel/tcg/translate-all.c +1
-0@@ -1020,6 +1022,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, }return tb; } +#pragma GCC diagnostic pop
No, I think this is a real setjmp problem.
I'll send a patch for this and a similar error in disas/nanomips.c.
r~