I finally caught my boss out. Since DSPs have a different architecture from ARM, a byte on a DSP is 16 bits, which makes struct alignment and sizeof() results differ from those on ARM.
He also firmly opposes standard library functions like memset() and memcpy(), insisting on manual loops for bulk operations. This caused problems when porting the software to ARM chip platforms to reduce costs. Even AC6 doesn't show this issue with Os; it only shows up when GCC has Os optimization enabled.
If you honestly stick to standard library utilities like sizeof() and memset(), this sort of problem won't occur, because both are based on the byte. It's still no use asking for that in the projects where I'm a slave to the company. In my own open-source libraries, however, I've used them very carefully, which actually makes the libraries more compatible.
sizeof() on a DSP