qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Thomas Huth <thuth@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	qemu-devel@nongnu.org
Cc: Chen Qun <kuhn.chenqun@huawei.com>
Subject: Re: [PATCH] tcg/optimize: Add fallthrough annotations
Date: Thu, 29 Oct 2020 13:07:07 -0700	[thread overview]
Message-ID: <24b2a36c-d94d-e5f6-57c0-a9e6c4970b53@linaro.org> (raw)
In-Reply-To: <20201029122833.195420-1-thuth@redhat.com>

On 10/29/20 5:28 AM, Thomas Huth wrote:
> To be able to compile this file with -Werror=implicit-fallthrough,
> we need to add some fallthrough annotations to the case statements
> that might fall through. Unfortunately, the typical "/* fallthrough */"
> comments do not work here as expected since some case labels are
> wrapped in macros and the compiler fails to match the comments in
> this case. But using __attribute__((fallthrough)) seems to work fine,
> so let's use that instead.

Why would the macro matter?  It expands to two case statements with nothing in
between them.

This sounds like a compiler bug that should be reported.


r~


  parent reply	other threads:[~2020-10-29 20:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 12:28 [PATCH] tcg/optimize: Add fallthrough annotations Thomas Huth
2020-10-29 12:37 ` Philippe Mathieu-Daudé
2020-10-29 20:07 ` Richard Henderson [this message]
2020-10-30  2:43   ` Chenqun (kuhn)

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=24b2a36c-d94d-e5f6-57c0-a9e6c4970b53@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=kuhn.chenqun@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    /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).