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

Re: [Xen-devel] [PATCH v2] x86_emulate: split the {reg, mem} union in struct operand.



>>> On 26.03.15 at 13:40, <tim@xxxxxxx> wrote:
> @@ -1447,14 +1452,15 @@ x86_emulate(
>      unsigned int op_bytes, def_op_bytes, ad_bytes, def_ad_bytes;
>      bool_t lock_prefix = 0;
>      int override_seg = -1, rc = X86EMUL_OKAY;
> -    struct operand src, dst;
> +    struct operand src = { .reg = REG_POISON };
> +    struct operand dst = { .reg = REG_POISON };
>      enum x86_swint_type swint_type;
>      DECLARE_ALIGNED(mmval_t, mmval);
>      /*
>       * Data operand effective address (usually computed from ModRM).
>       * Default is a memory operand relative to segment DS.
>       */
> -    struct operand ea = { .type = OP_MEM };
> +    struct operand ea = { .type = OP_MEM, .reg = REG_POISON };

This failed my pre-push build check - older gcc  (4.3.4 in this case)
doesn't allow initializing fields of unnamed struct/union.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.