Re: [Qemu-devel] [PATCH v5 04/46] qapi: Add tests for empty unions

2015-09-24 Thread Eric Blake
On 09/24/2015 08:16 AM, Markus Armbruster wrote: > Eric Blake writes: > >> The documentation claims that alternates are useful for >> allowing two types, although nothing enforces this. Meanwhile, >> it is silent on whether empty unions are allowed. In practice, >> the generated code will compi

Re: [Qemu-devel] [PATCH v5 04/46] qapi: Add tests for empty unions

2015-09-24 Thread Markus Armbruster
Eric Blake writes: > The documentation claims that alternates are useful for > allowing two types, although nothing enforces this. Meanwhile, > it is silent on whether empty unions are allowed. In practice, > the generated code will compile, in part because we have a > 'void *data' branch; but

[Qemu-devel] [PATCH v5 04/46] qapi: Add tests for empty unions

2015-09-21 Thread Eric Blake
The documentation claims that alternates are useful for allowing two types, although nothing enforces this. Meanwhile, it is silent on whether empty unions are allowed. In practice, the generated code will compile, in part because we have a 'void *data' branch; but attempting to visit such a type