Re: [Qemu-devel] QAPI and empty structs

2015-01-12 Thread Peter Maydell
On 12 January 2015 at 15:31, Markus Armbruster wrote: > Eric Blake writes: >> On 12/23/2014 08:50 AM, Peter Maydell wrote: >>> Although you could argue that we don't care about differences >>> in C and C++ semantics, having a zero-sized struct floating >>> around seems a bit risky to me, since fo

Re: [Qemu-devel] QAPI and empty structs

2015-01-12 Thread Markus Armbruster
Eric Blake writes: > On 12/23/2014 08:50 AM, Peter Maydell wrote: >> In qapi-schema.json we have a couple of entries that define >> empty structures, like this: >> >> { 'type': 'ChardevDummy', 'data': { } } >> >> In the generated qapi-types.h these are turned into empty C structs: >> > >> Alth

Re: [Qemu-devel] QAPI and empty structs

2014-12-23 Thread Eric Blake
On 12/23/2014 08:50 AM, Peter Maydell wrote: > In qapi-schema.json we have a couple of entries that define > empty structures, like this: > > { 'type': 'ChardevDummy', 'data': { } } > > In the generated qapi-types.h these are turned into empty C structs: > > Although you could argue that we don

[Qemu-devel] QAPI and empty structs

2014-12-23 Thread Peter Maydell
In qapi-schema.json we have a couple of entries that define empty structures, like this: { 'type': 'ChardevDummy', 'data': { } } In the generated qapi-types.h these are turned into empty C structs: struct ChardevDummy { }; and clang warns about them: ./qapi-types.h:3752:1: warning: empty struct