2c(2) states: Array initializers can specify the indices of the array in > square brackets, as > int a[] = { [3] 1, [10] 5 }; > which initializes the third and tenth elements of the > eleven-element array a.
This is somewhat confusing: the third and the tenth element should have index 2 and 9. Moreover if the tenth element is actually referred by index 10, why the array should hold eleven elements? A simple check shows that actually the array has 11 elements and the one initialized are the forth and the eleventh. Giacomo
diff -r 51285ae4f545 sys/man/1/2c --- a/sys/man/1/2c Thu Mar 05 10:17:23 2015 +0100 +++ b/sys/man/1/2c Tue Mar 10 16:52:03 2015 +0100 @@ -250,7 +250,7 @@ .EX int a[] = { [3] 1, [10] 5 }; .EE -which initializes the third and tenth elements of the eleven-element array +which initializes the forth and eleventh elements of the eleven-element array .BR a . .TP \-