A
Ark
As a const data tables freak, I find it distressing that
const int foo[10] = {
[5] = 8,
[5] = 9,
};
compiles by IAR (EWARM 4.40a) without any warnings. (Nor does PC-Lint
8.00u see anything wrong.)
The actual content at an index happens to be the last initializer for it.
Is this indeed legal? If so, what's the rationale behind it?
Thanks,
- Ark
const int foo[10] = {
[5] = 8,
[5] = 9,
};
compiles by IAR (EWARM 4.40a) without any warnings. (Nor does PC-Lint
8.00u see anything wrong.)
The actual content at an index happens to be the last initializer for it.
Is this indeed legal? If so, what's the rationale behind it?
Thanks,
- Ark