I'd like to be able to make the assumption that char is ABI compatible with u32 for some validation code in bytecheck. I have actually been making this assumption for a while and never had problems (including with MIRI), so I think this is de-facto the case. I thought that char and u32 were supposed to have the same layout but when I went looking I realized I couldn't find anything. As far as I know, it doesn't really make sense for chars to be anything other than a u32 with fewer valid bit patterns.
For completeness:
I'd like to be able to make the assumption that
charis ABI compatible withu32for some validation code in bytecheck. I have actually been making this assumption for a while and never had problems (including with MIRI), so I think this is de-facto the case. I thought thatcharandu32were supposed to have the same layout but when I went looking I realized I couldn't find anything. As far as I know, it doesn't really make sense forchars to be anything other than au32with fewer valid bit patterns.For completeness:
u32andcharare four bytes.u32.