| Because it is non trivial when using C or any derived language that has copy-paste semantics with C. It starts by C not having fixed sizes for its datatypes. Sure there were always macros/typedefs with such fixed sizes and C99 introduced stdint header. However not everyone actually uses them. Then there are the bit fiddling algorithms, unions and casts that assume a specific memory layout. Followed by code that might actually become UB when switching to another memory model. All of that scattered across hundreds of files, not written by a single person, with an history of decades of code changes. |