 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] clang: disable the gcc-compat warnings for read_atomic
 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |