From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc1Xy-0000Z8-OU for qemu-devel@nongnu.org; Tue, 05 Jun 2012 17:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sc1Xv-0004jf-U1 for qemu-devel@nongnu.org; Tue, 05 Jun 2012 17:44:14 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:58932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc1Xv-0004j2-Lf for qemu-devel@nongnu.org; Tue, 05 Jun 2012 17:44:11 -0400 Received: by pbbro12 with SMTP id ro12so8694554pbb.4 for ; Tue, 05 Jun 2012 14:44:09 -0700 (PDT) Sender: fluxion Date: Tue, 5 Jun 2012 16:44:03 -0500 From: Michael Roth Message-ID: <20120605214403.GN2916@illuin> References: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> <1338858018-17189-3-git-send-email-mdroth@linux.vnet.ibm.com> <4FCE12F7.9010206@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FCE12F7.9010206@redhat.com> Subject: Re: [Qemu-devel] [PATCH 02/17] qidl: add qc definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aliguori@us.ibm.com, owasserm@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, yamahata@valinux.co.jp, akong@redhat.com, afaerber@suse.de On Tue, Jun 05, 2012 at 04:08:55PM +0200, Paolo Bonzini wrote: > Il 05/06/2012 03:00, Michael Roth ha scritto: > > Signed-off-by: Michael Roth > > --- > > qapi/qc.h | 11 +++++++++++ > > 1 files changed, 11 insertions(+), 0 deletions(-) > > create mode 100644 qapi/qc.h > > > > diff --git a/qapi/qc.h b/qapi/qc.h > > new file mode 100644 > > index 0000000..3b3a8b9 > > --- /dev/null > > +++ b/qapi/qc.h > > @@ -0,0 +1,11 @@ > > +#ifndef QC_H > > +#define QC_H > > + > > +#define qc_declaration > > +#define _immutable > > +#define _derived > > +#define _broken > > +#define _version(x) > > +#define _size_is(x) > > Would it be feasible to make the declaration look like the GCC attribute > extension, e.g. > > struct RTCState QIDL() { > int foo QIDL(immutable); > int bar QIDL(derived); > }; > > so that you can just use "#define QIDL(...)"? This is how GCC > developers did their introspection annotations. This does seem a lot cleaner to me, also simplifies the lexer and we get namespacing for free. > > Paolo >