Suppose I have a structure defined as follows:
typedef struct Counters {
uint8_t counterSec : 6;
uint8_t : 3;
uint8_t counterMin : 6;
uint8_t : 3;
uint8_t counterHr : 5;
uint8_t : 1;
};
As I want to dedicate 6 bits per first two counters and 5 bits per last counter, I end up with 17 bits, which means that a total of 24 bits will be allocated to an instance of Counters-type structure variable. What may be a practical significance of defining empty bit fields such as in the structure above - if there is any?
In response to the duplicity of this question - a similar question has indeed been asked before. The situation in which I encountered empty bit fields relates to microcontroller programming and configuring registers - hence, the question is regarding the use of empty bit fields in that particular situation. Unfortunately, answers on a similar post did not address these question. Hopefully this will justify this question a little bit more :)