From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmnYn-0006x4-Dh for qemu-devel@nongnu.org; Mon, 27 Apr 2015 14:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmnYi-0007Uf-FP for qemu-devel@nongnu.org; Mon, 27 Apr 2015 14:15:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmnYi-0007UX-AT for qemu-devel@nongnu.org; Mon, 27 Apr 2015 14:15:08 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id EC87A8E78A for ; Mon, 27 Apr 2015 18:15:07 +0000 (UTC) From: Markus Armbruster References: <1428206887-7921-1-git-send-email-eblake@redhat.com> <1428206887-7921-12-git-send-email-eblake@redhat.com> Date: Mon, 27 Apr 2015 20:15:05 +0200 In-Reply-To: <1428206887-7921-12-git-send-email-eblake@redhat.com> (Eric Blake's message of "Sat, 4 Apr 2015 22:07:42 -0600") Message-ID: <87h9s11lqu.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v6 11/36] qapi: Tighten checking of unions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, berto@igalia.co, qemu-devel@nongnu.org Eric Blake writes: > Previous commits demonstrated that the generator had several > flaws with less-than-perfect unions: > - a simple union that listed the same branch twice (or two variant > names that map to the same C enumerator, including the implicit > MAX sentinel) ended up generating invalid C code > - an anonymous union that listed two branches with the same qtype > ended up generating invalid C code > - the generator crashed on anonymous union attempts to use an > array type > - the generator was silently ignoring a base type for anonymous > unions > - the generator allowed unknown types or nested anonymous unions > as a branch in an anonymous union > > Signed-off-by: Eric Blake [...] > diff --git a/tests/qapi-schema/alternate-array.json b/tests/qapi-schema/alternate-array.json > index c2965cf..77970d9 100644 > --- a/tests/qapi-schema/alternate-array.json > +++ b/tests/qapi-schema/alternate-array.json > @@ -1,4 +1,4 @@ > -# FIXME: we do not support array branches of anonymous unions yet > +# we do not support array branches of anonymous unions yet > # TODO: should we support this? > { 'type': 'One', > 'data': { 'name': 'str' } } FIXME added in PATCH 08, demoted to plain comment now. Any particular reason for the churn? [...] Regardless, Reviewed-by: Markus Armbruster