zero width for bit-field.
- The compiler has detected a bit-field with zero width
- Named bit fields cannot have zero width.
- Bit fields can have zero width only if unnamed.
How to fix it ?
- To resolve this error, you can:
- Change the bit field to a nameless bit field .
- Remove the bit field.
- Change the value of the bit field to an integer constant expression with a value greater to zero.
- A bit field declaration is a struct or union member declaration which uses the following syntax:
<type> <Identifier(optional)> : <width>
- An integer type.(unsigned int, signed int, int, _Bool)
- the name of the bit field that is being declared.
- The name is optional
- an integer constant expression with a value greater or equal to zero and less or equal the number of bits in the underlying type.