* [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclobbered
@ 2022-11-05 11:44 Stefan Weil via
2022-11-05 22:05 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil via @ 2022-11-05 11:44 UTC (permalink / raw)
To: qemu-trivial, qemu-devel; +Cc: Richard Henderson, Paolo Bonzini, 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 <sw@weilnetz.de>
---
accel/tcg/translate-all.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 921944a5ab..90191d97ec 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -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)
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclobbered
2022-11-05 11:44 [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclobbered Stefan Weil via
@ 2022-11-05 22:05 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2022-11-05 22:05 UTC (permalink / raw)
To: Stefan Weil, qemu-trivial, qemu-devel; +Cc: Paolo Bonzini
On 11/5/22 22:44, Stefan Weil wrote:
> 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 <sw@weilnetz.de>
> ---
> accel/tcg/translate-all.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index 921944a5ab..90191d97ec 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -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
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~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-05 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-05 11:44 [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclobbered Stefan Weil via
2022-11-05 22:05 ` Richard Henderson
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).