qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v4 05/23] compiler: rework BUG_ON using a struct


From: Eric Blake
Subject: Re: [Qemu-devel] [PULL v4 05/23] compiler: rework BUG_ON using a struct
Date: Tue, 31 Jan 2017 12:53:34 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/31/2017 12:42 PM, Michael S. Tsirkin wrote:
> There are theoretical concerns that some compilers might not trigger
> build failures on attempts to define an array of size (x ? -1 : 1) where
> x is a variable and make it a variable sized array instead. Let rewrite

s/Let/Let's/

> using a struct with a negative bit field size instead as there are no
> dynamic bit field sizes.  This is similar to what Linux does.

On one of the earlier review spins, I suggested making it explicit that
we are now requiring that the condition be a compile-time constant (you
got that wording in 2/23, but not here) - food for thought if you have
to respin this.

> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Markus Armbruster <address@hidden>
> ---
>  include/qemu/compiler.h | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]