qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PULL v4 06/23] QEMU_BUILD_BUG_ON: use __COUNTER__
Date: Tue, 31 Jan 2017 12:52:11 -0600	[thread overview]
Message-ID: <c7b111d6-3c5c-e89c-f928-e195469b2328@redhat.com> (raw)
In-Reply-To: <1485888144-16531-7-git-send-email-mst@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]

On 01/31/2017 12:43 PM, Michael S. Tsirkin wrote:
> Some headers use QEMU_BUILD_BUG_ON. This causes a problem
> if the C file including that header happens to have
> QEMU_BUILD_BUG_ON at the same line number.
> 
> Fix using a widely available extension: __COUNTER__.
> If unavailable, provide a stub.

Uhh, this isn't the right commit message.  What happened?

> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  include/qemu/compiler.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index 057639a..e0ce9ff 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -97,6 +97,9 @@
>  #define QEMU_BUILD_BUG_ON(x)
>  #endif
>  
> +#define QEMU_BUILD_BUG_ON_ZERO(x) (sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)) - \
> +                                   sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)))
> +
>  #if defined __GNUC__
>  # if !QEMU_GNUC_PREREQ(4, 4)
>     /* gcc versions before 4.4.x don't support gnu_printf, so use printf. */
> 

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-01-31 18:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 18:42 [Qemu-devel] [PULL v4 00/23] virtio, vhost, pci: fixes, features Michael S. Tsirkin
2017-01-31 18:42 ` [Qemu-devel] [PULL v4 01/23] compiler: drop ; after BUILD_BUG_ON Michael S. Tsirkin
2017-01-31 18:42 ` [Qemu-devel] [PULL v4 02/23] qxl: switch to constants within BUILD_BUG_ON Michael S. Tsirkin
2017-01-31 18:42 ` [Qemu-devel] [PULL v4 03/23] ppc: " Michael S. Tsirkin
2017-01-31 18:42 ` [Qemu-devel] [PULL v4 04/23] QEMU_BUILD_BUG_ON: use __COUNTER__ Michael S. Tsirkin
2017-01-31 18:42 ` [Qemu-devel] [PULL v4 05/23] compiler: rework BUG_ON using a struct Michael S. Tsirkin
2017-01-31 18:53   ` Eric Blake
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 06/23] QEMU_BUILD_BUG_ON: use __COUNTER__ Michael S. Tsirkin
2017-01-31 18:52   ` Eric Blake [this message]
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 07/23] compiler: expression version of QEMU_BUILD_BUG_ON Michael S. Tsirkin
2017-01-31 18:56   ` Eric Blake
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 08/23] ARRAY_SIZE: check that argument is an array Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 09/23] pci: mark ROMs read-only Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 10/23] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc() Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 11/23] hw/pcie: Introduce a base class for PCI Express Root Ports Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 12/23] hw/ioh3420: derive from PCI Express Root Port base class Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 13/23] hw/pcie: Introduce Generic PCI Express Root Port Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 14/23] hw/i386: check if nvdimm is enabled before plugging Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 15/23] msix: Follow CODING_STYLE Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 16/23] hcd-xhci: check & correct param before using it Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 17/23] pci: Convert msix_init() to Error and fix callers Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 18/23] virtio: make virtio_should_notify static Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 19/23] vhost: skip ROM sections Michael S. Tsirkin
2017-01-31 18:43 ` [Qemu-devel] [PULL v4 20/23] vhost-user: delete chardev on cleanup Michael S. Tsirkin
2017-01-31 18:44 ` [Qemu-devel] [PULL v4 21/23] hw/pci: disable pci-bridge's shpc by default Michael S. Tsirkin
2017-01-31 18:44 ` [Qemu-devel] [PULL v4 22/23] arm: better stub version for MISMATCH_CHECK Michael S. Tsirkin
2017-01-31 18:44 ` [Qemu-devel] [PULL v4 23/23] arm: add trailing ; after MISMATCH_CHECK Michael S. Tsirkin
2017-01-31 18:54 ` [Qemu-devel] [PULL v4 00/23] virtio, vhost, pci: fixes, features Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7b111d6-3c5c-e89c-f928-e195469b2328@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).