In our case, uint32_t maps to unsigned int, so according to 6.7.2.1 the bit field shall have the type unsigned int.
Further down there’s the following:A bit-field is interpreted as a signed or unsigned integer type consisting of the specified number of bits.
— A bit-field of type _Bool , int , signed int , or unsigned int .
Some compiler writers looked at a declaration such as unsigned int uf2 : 12; and said, okay, the “original” type of the uf2 bit-field is clearly unsigned int.
That triggers the same process of first promoting the bit-field to either int or unsigned int and then to double.
1 час назад @ os2museum.com
infomate
