|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/tss: Fix clang build following c/s 7888440625
On Tue, Aug 13, 2019 at 01:01:17PM +0100, Andrew Cooper wrote:
> Clang-3.5 from Debian Jessie fails with:
>
> smpboot.c:829:29: error: statement expression not allowed at file scope
> BUILD_BUG_ON(sizeof(this_cpu(tss_page)) != PAGE_SIZE);
> ^
> /local/xen.git/xen/include/asm/percpu.h:14:7: note: expanded from macro
> 'this_cpu'
> (*RELOC_HIDE(&per_cpu__##var, get_cpu_info()->per_cpu_offset))
> ^
> /local/xen.git/xen/include/xen/compiler.h:98:3: note: expanded from macro
> 'RELOC_HIDE'
> ({ unsigned long __ptr; \
> ^
> /local/xen.git/xen/include/xen/lib.h:26:53: note: expanded from macro
> 'BUILD_BUG_ON'
> #define BUILD_BUG_ON(cond) ((void)BUILD_BUG_ON_ZERO(cond))
> ^
> /local/xen.git/xen/include/xen/lib.h:25:57: note: expanded from macro
> 'BUILD_BUG_ON_ZERO'
> #define BUILD_BUG_ON_ZERO(cond) sizeof(struct { int:-!!(cond); })
> ^
> 1 error generated.
> /local/xen.git/xen/Rules.mk:202: recipe for target 'smpboot.o' failed
>
> This is obviously a compiler bug because the BUILD_BUG_ON() is not at file
> scope. However, it can be worked around by using a local variable.
>
> Spotted by Gitlab CI.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Wei Liu <wl@xxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |