enum

    1. Test 1/8 enum ordinal value...OK
    2. Test 2/8 set enum ordinal value...OK
    3. Test 3/8 enum method...OK
    4. Test 4/8 enum variant switch...OK
    5. Test 6/8 @memberCount...OK
    6. Test 8/8 @tagName...OK
    7. All tests passed.

    By default, enums are not guaranteed to be compatible with the C ABI:

    test.zig

    1. $ zig build-obj test.zig
    2. /home/andy/dev/zig/docgen_tmp/test.zig:2:22: error: parameter of type 'Foo' not allowed in function with calling convention 'ccc'
    3. export fn entry(foo: Foo) void {

    test.zig

    1. $ zig build-obj test.zig

    packed enum

    By default, the size of enums is not guaranteed.

    test.zig

    1. $ zig test test.zig
    2. Test 1/1 packed enum...OK
    3. All tests passed.

    This makes the enum eligible to be in a .