Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-19 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > All users include the trailing ;, let's require that > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > produce unexpected results. > > Not a huge problem for QEMU since our style requires the use > of {} but seems cleaner nevertheless. I

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 21:23, Michael S. Tsirkin wrote: > On Wed, Jan 18, 2017 at 11:16:07PM +0200, Michael S. Tsirkin wrote: >> On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: >> > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: >> > > All

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 11:16:07PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: > > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > > > All users include the trailing ;, let's require that > > > so that uses such as if

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > > All users include the trailing ;, let's require that > > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > > produce unexpected results. > > When

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > All users include the trailing ;, let's require that > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > produce unexpected results. When would it ever make sense for a build-time assert to be the only thing inside

[Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
All users include the trailing ;, let's require that so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not produce unexpected results. Not a huge problem for QEMU since our style requires the use of {} but seems cleaner nevertheless. Signed-off-by: Michael S. Tsirkin ---