qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Stefan Weil <sw@weilnetz.de>,
	qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH for-7.2] accel/tcg: Suppress compiler warning with flag -Wclobbered
Date: Sun, 6 Nov 2022 09:05:29 +1100	[thread overview]
Message-ID: <8fdb76d5-1035-0f35-d2bf-4bdee653d67a@linaro.org> (raw)
In-Reply-To: <20221105114424.622563-1-sw@weilnetz.de>

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~



      reply	other threads:[~2022-11-05 22:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fdb76d5-1035-0f35-d2bf-4bdee653d67a@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).