No. There is a reliable way to declare individual integer variables up to 32 bits in size, however, if you are willing to live with some restrictions. Just use the long bit fields (the latter must be guaranteed to be at least 32-bit, and you are allowed to use up to a few bits in the bit fields, as if fit into a variable if the bitfield declarator was omitted). So:
struct { unsigned long foo : 32; } bar;
Obviously, you get all the restrictions that come with this, for example, the inability to have pointers to such variables. The only thing you really buy is a guaranteed workaround at the specified border for overflow / underflow, and even then only for unsigned types, since overflow is undefined for signed ones.
In addition, there is no portable way to do this in a pure C90. Among other things, the implementation of the Cant-compatible C90 does not even require an 8-bit integer - it is logical to have a platform in which sizeof(char) == sizeof(short) == sizeof(int) == 1 and CHAR_BIT == 16 ( i.e. it has a 16-bit machine word, and cannot address individual bytes). I heard that such platforms really exist in practice in the form of some DSPs.
source share