qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 11/36] qapi: Tighten checking of unions


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v6 11/36] qapi: Tighten checking of unions
Date: Mon, 27 Apr 2015 20:15:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> 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 <address@hidden>
[...]
> 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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]