I have a code which uses bit-fields declared as follows
typedef struct my{ const char *name; uint8_t is_alpha : 1; uint8_t is_hwaccel : 1; uint8_t x_chroma_shift; uint8_t y_chroma_shift; } mystr; uint8_t is typedef'ed to unsigned char.
Building the code in MS-VS 2008 using this bit fields gives a warning as below:
imgconvert.c(60) : warning C4214: nonstandard extension used : bit-field types other than int.
- Is there any problems/potential issues in using bit fields of type other than int? Why the warning?
- Are other than int type bit-fileds they allowed by C99 C language specification?