While they are non-portable, they are designed exactly for the OP's purpose: Fit data into an externally imposed format. To this end, it is specified that the bit fields are adjacent; IIUC, the main issue are bit/byte order issues, to which code needs to cater which is aimed at more than one platform. But your suggestion is pointless: If you do the hand-packing, there is no need for the bit-fields any longer.
↧