Then, make flex arrays to zero-length arrays, as union cannot have
flex arrays, even though flex and zero-length arrays are effectively
equivalent.
le64_t xor_hash; \
union { \
struct { \
- dummy_t __empty__regular; \
- struct { \
- le64_t object_offset; \
- le64_t hash; \
- } regular[]; \
- }; \
+ le64_t object_offset; \
+ le64_t hash; \
+ } regular[0]; /* this is an array; since we are not allowed to place a variable sized array
+ * in a union, we just zero-size it, even if it is generally longer. */ \
struct { \
- dummy_t __empty_compact; \
- struct { \
- le32_t object_offset; \
- } compact[]; \
- }; \
+ le32_t object_offset; \
+ } compact[0]; \
} items; \
}