Re: [Qemu-devel] [PATCH v8 12/35] qapi: Don't cast Enum* to int*

2016-01-05 Thread Eric Blake
On 01/05/2016 07:06 AM, Marc-André Lureau wrote: > Hi > > On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: >> C compilers are allowed to represent enums as a smaller type >> than int, if all enum values fit in the smaller type. There >> are even compiler flags that force the use of this smalle

Re: [Qemu-devel] [PATCH v8 12/35] qapi: Don't cast Enum* to int*

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > C compilers are allowed to represent enums as a smaller type > than int, if all enum values fit in the smaller type. There > are even compiler flags that force the use of this smaller > representation, and using them changes the ABI of a bi

[Qemu-devel] [PATCH v8 12/35] qapi: Don't cast Enum* to int*

2015-12-21 Thread Eric Blake
C compilers are allowed to represent enums as a smaller type than int, if all enum values fit in the smaller type. There are even compiler flags that force the use of this smaller representation, and using them changes the ABI of a binary. Therefore, our generated code for visit_type_ENUM() (for a