As per C99, there maybe padding bits in signed int or unsigned int representation . So I wonder are there still any implementations having such outdated things?
As per C99, there maybe padding bits in signed int or unsigned int representation
Share
Quoting the C99 rationale (PDF) section 6.2.6.2 §20:
So such things at least did exist.
As for weird architectures still around today, the go-to example is the UNIVAC 1100/2200 series with its weird data formats.
While it does not use integer padding, a look at their C compiler manual (PDF) is still instructive:
The second volume (PDF) explains how the
CONFORMANCE/TWOSARITHcompiler keyword can be used to control interpretation of negative zero: this adjusts the range of the unsigned integer types to the expected (2^36)-1 but comes with a performance penalty on unsigned arithmetics.