[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclo

From: Richard Henderson
Subject: Re: [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclobbered
Date: Sun, 6 Nov 2022 09:05:29 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]