On Tue, Jul 07, 2015 at 09:25:30AM +0200, Sebastien Marie wrote:
> 
> Note I am unsure on a point: the array is defined to be _CACHED_RUNES
> (1<<8 = 256) elements in size. Here the initialisation is for 128
> elements.
> 
> > int tab[256] = {0, 1, 2, ..., 126, 127};
> 
> Should the rest of the array be initialised with zero ? or the compiler
> will do it alone ? I have checked NetBSD, FreeBSD and DragonflyBSD: all
> have this construct (array of 256, initialisation with 128 elements).

That is fine, if you partially initialize an array, the rest gets a
default value of 0. A quite common idiom is for example:

int ar[1024] = {0}; /* make all elements zero */

Regards, rck

Reply via email to