Hi dear people.
While compiling my project on CCS 12.4.0.00007 , I get warnings about an array on it.
line 74: warning #1986-D: array of elements containing a flexible array member is nonstandard
line 78: warning #1238-D: excess initializers are ignored
line 79: warning #1238-D: excess initializers are ignored
etc.
Here is the array (I have only included some elements)
static const RegValue initValues[] = {
{0x00, {0x00}},
{0x01, {0x01}},
{0x00, {0x00}},
{0x04, {0x03, 0x91, 0x08, 0x00, 0x00}},
{0x0B, {0x82, 0x88}},... etc
I need this array to be flexible, I am using a function to count the number of elements and interact with those.
I understand the situation as follows, please tell me how wrong I am:
- It is clearly a flexible array
- The array is declared in a .h file and filled with the elements the array has. Not more, not less.
- The compiler sees this and determines the size of the array.
But then, the compiler says, that the number of elements does not fit into the list it made by counting the number of elements I declared...?
The questions are:
- Does "excess initializers are ignored" means, the compiler is cutting elements out of the array?
- If the array is being compiled without loosing any data, is there any setting for the compiler I can change, in order not to have those warnings?
Many thanks in advance!
Gustavo