xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Marc Marí" <marc.mari.barcelo@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	X86 <xen-devel@lists.xensource.com>, X86 <kvm@vger.kernel.org>,
	"Stefan Hajnoczi" <stefanha@gmail.com>,
	qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2 01/16] x86: Convert conditional compilation of debug printfs to regular ifs
Date: Thu, 15 May 2014 11:44:46 +0200	[thread overview]
Message-ID: <20140515114446.2e252e76@crunchbang> (raw)
In-Reply-To: <53722E62.8000304@redhat.com>

El Tue, 13 May 2014 08:38:26 -0600
Eric Blake <eblake@redhat.com> escribió:
> Although __VA_ARGS__ is required by C99, the use of ##__VA_ARGS__ is a
> gcc extension; are you sure that all other supported compilers handle
> it?  (I guess that's just clang)
> 
> If you want something portable to C99, just use one fewer macro
> argument, so that you are guaranteed that __VA_ARGS__ will be
> non-empty (that is, subsume fmt into the ...):
> 
> #define DEBUG(...)						\
>     QEMU_DPRINTF(DEVICE_ASSIGNMENT_DEBUG_ENABLED,		\
>                  "pci_assign", __VA_ARGS__)
> 

I found some problems to convert from ## __VA_ARGS__ to __VA_ARGS__ in
some parts, and as I asked in IRC, it was pointed that "our HACKING
document recommends the fmt, ## __VA_ARGS__ approach, and it obviously
works on all the compilers we care about". So I will leave this as it
is now.

Marc

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-05-15  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1399964572-5376-1-git-send-email-marc.mari.barcelo@gmail.com>
2014-05-13  7:02 ` [PATCH v2 01/16] x86: Convert conditional compilation of debug printfs to regular ifs Marc Marí
2014-05-13  7:38   ` Andreas Färber
2014-05-13 14:38   ` [Qemu-devel] " Eric Blake
2014-05-15  9:44     ` Marc Marí [this message]
2014-05-13 15:15   ` 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=20140515114446.2e252e76@crunchbang \
    --to=marc.mari.barcelo@gmail.com \
    --cc=afaerber@suse.de \
    --cc=eblake@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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).