All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] clang: disable the gcc-compat warnings for read_atomic
Date: Tue, 1 Aug 2017 08:04:10 +0100	[thread overview]
Message-ID: <20170801070410.rqcriogfjyngf4ve@dhcp-3-128.uk.xensource.com> (raw)
In-Reply-To: <20170411075420.55018-1-roger.pau@citrix.com>

On Tue, Apr 11, 2017 at 08:54:20AM +0100, Roger Pau Monne wrote:
> clang gcc-compat warnings can wrongly fire when certain constructions are used,
> at least the following flow:
> 
> switch ( ... )
> {
> case ...:
>     while ( ({ int x; switch ( foo ) { case 1: x = 1; break; } x }) )
>     {
>         ...
> 
> Will cause clang to emit the following warning "'break' is bound to loop, GCC
> binds it to switch", which is a false positive, and both gcc and clang bound
> the break to the inner switch. In order to workaround this issue, disable the
> gcc-compat checks for the usage of the read_atomic macro.
> 
> This has been reported upstream as http://bugs.llvm.org/show_bug.cgi?id=32595.

FWIW, this has now been fixed upstream:

https://reviews.llvm.org/rL307051

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      parent reply	other threads:[~2017-08-01  7:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11  7:54 [PATCH] clang: disable the gcc-compat warnings for read_atomic Roger Pau Monne
2017-04-11  8:35 ` Jan Beulich
2017-04-11  8:46   ` Roger Pau Monne
2017-04-13 15:11 ` Jan Beulich
2017-04-13 15:23   ` Julien Grall
2017-08-01  7:04 ` Roger Pau Monne [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=20170801070410.rqcriogfjyngf4ve@dhcp-3-128.uk.xensource.com \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.