Re: [Qemu-devel] [PATCH v2] use _Static_assert in QEMU_BUILD_BUG_ON

2017-04-23 Thread Michael Tokarev
14.03.2017 19:59, Andreas Grapentin wrote: > QEMU_BUILD_BUG_ON should use C11's _Static_assert, if the compiler supports > it, > to provide more readable messages on failure. ... Applied to -trivial, with trivial commit comment fix. Thanks! /mjt

Re: [Qemu-devel] [PATCH v2] use _Static_assert in QEMU_BUILD_BUG_ON

2017-03-14 Thread Richard Henderson
On 03/15/2017 02:59 AM, Andreas Grapentin wrote: QEMU_BUILD_BUG_ON should use C11's _Static_assert, if the compiler supports it, to provide more readable messages on failure. We check for _Static_assert in configure, and set CONFIG_STATIC_ASSERT accordingly. QEMU_BUILD_BUG_ON invokes _Static_ass

Re: [Qemu-devel] [PATCH v2] use _Static_assert in QEMU_BUILD_BUG_ON

2017-03-14 Thread Andreas Grapentin
The missing ! is because I generated the error messages by inverting the condition and then forgot to change it back. I can send a v3 if you like. Thanks for being patient with me. -A On Tue, Mar 14, 2017 at 12:43:56PM -0500, Eric Blake wrote: > On 03/14/2017 11:59 AM, Andreas Grapentin wrote:

Re: [Qemu-devel] [PATCH v2] use _Static_assert in QEMU_BUILD_BUG_ON

2017-03-14 Thread Eric Blake
On 03/14/2017 11:59 AM, Andreas Grapentin wrote: > QEMU_BUILD_BUG_ON should use C11's _Static_assert, if the compiler supports > it, > to provide more readable messages on failure. > > with _Static_assert: > >> In file included from /qemu/include/qemu/osdep.h:36:0, >> from /qem

[Qemu-devel] [PATCH v2] use _Static_assert in QEMU_BUILD_BUG_ON

2017-03-14 Thread Andreas Grapentin
QEMU_BUILD_BUG_ON should use C11's _Static_assert, if the compiler supports it, to provide more readable messages on failure. We check for _Static_assert in configure, and set CONFIG_STATIC_ASSERT accordingly. QEMU_BUILD_BUG_ON invokes _Static_assert if CONFIG_STATIC_ASSERT is defined, and reverts