Re: [Qemu-devel] [PATCH v6 07/36] qapi: Better error messages for bad enums

2015-04-28 Thread Eric Blake
On 04/04/2015 10:07 PM, Eric Blake wrote: > The previous commit demonstrated that the generator had several > flaws with less-than-perfect enums: > +++ b/tests/qapi-schema/enum-max-member.json > @@ -1,3 +1,3 @@ > -# FIXME: we should either reject user-supplied 'max', or munge the implicit > -# max

[Qemu-devel] [PATCH v6 07/36] qapi: Better error messages for bad enums

2015-04-04 Thread Eric Blake
The previous commit demonstrated that the generator had several flaws with less-than-perfect enums: - an enum that listed the same string twice (or two variant strings that map to the same C enumerator) ended up generating an invalid C enum - because the generator adds a _MAX terminator to each enu