The field portion of bit fields seems to suggest that they can only be fields within a structure or union.
Can a bit field be a typical "autonomous" variable, outside of any aggregate data type, such as a union or structure, as follows:
int sum:6;
sum=4;
If not, why? If bit fields are mainly designed to use less memory, why can't we declare any variable as a bit field if we know that it will not exceed this size?
source
share