Eric Blake <[email protected]> writes:

> We were previously enforcing that all flat union branches were
> found in the corresponding enum, but not that all enum values
> were covered by branches.  The resulting generated code would
> abort() if the user passes the uncovered enum value.
>
> Signed-off-by: Eric Blake <[email protected]>

I'd let the cases not mentioned default to the empty type (ample
precedence in other languages), but I can live with making the user ask
for the empty type explicitly.  But we should then make that less
cumbersome than now: you have to define an empty struct type, and use
that.  Examples of such hoop-jumping: CpuInfoOther, Abort,
NetdevNoneOptions.

Patch looks good.

Reply via email to