Sam Clegg
Sam Clegg
I could do this in two phases perhaps: - Narrow the type of EM_BOOL - Remove the use of EM_BOOL
> Why do struct sizes change? I'd expect an int and an unpacked bool to both take 32 bits. Is that wrong? I guess `bool` is just a single byte...
> > Why do struct sizes change? I'd expect an int and an unpacked bool to both take 32 bits. Is that wrong? > > I guess `bool` is just...
> By itself it's 1 byte, I guess, but inside a struct the field after it might be aligned: > > ```c++ > #include > #include > > class C...
Rebased now that #22157 has landed. I'm planning on waiting for a release or two before landing this larger change.
Added a test.
Added test as a separate commit
This change is now ready to land I think
> Looking at stdbool.h, it has > > ```c > #ifndef _STDBOOL_H > #define _STDBOOL_H > > #ifndef __cplusplus > > #define true 1 > #define false 0 > #define...
> Just to note, this looks like a massive user-facing breaking ABI change. The previous sizeof(EM_BOOL) change from 4 bytes to 1 byte also was a breaking ABI change, and...