Different types - different consistency?

I am working on a fairly old atm code, and this code validates types such as short , int , long and long long separately.

Are there "still in use" systems that actually have different byte ordering for different types (due to the different sizes of these types)? The only example I know is PDP-11, where two 16-bit halves of 32-bit values ​​are stored in a "large end order", while two 8-bit halves of each of these 16 bits are stored in a "small order".

Due to the undefined behavior in the tests mentioned, I probably need to rewrite parts of this and find out if it's worth the effort to preserve this complexity. I know that (and how) I can write code that does not depend on the system entity, but that would be a lot of changes for which I do not have time now.

+5
source share

All Articles