Open
Description
repr(align) on enums is implemented as described in the reference:
The align modifier can also be applied on an enum. When it is, the effect on the enum's alignment is the same as if the enum was wrapped in a newtype struct with the same align modifier.
But this is not how aligned enums work in Clang, GCC, and MSVC
- GCC ignores alignment requests on enums.
- Clang sets the alignment to the requested alignment even if this decreases the alignment. The size is unaffected.
- MSVC increases the alignment to the requested alignment. The size is unaffected.