On 8/29/06, Brad Beveridge <[EMAIL PROTECTED]> wrote:
On 29/08/06, Ilya <[EMAIL PROTECTED]> wrote:
> Brad Beveridge wrote:
> >    static char string[2] = {0};
> Should not you have "= {0, 0}" here?  Second element never get
> initialized but it could be accessed by ml_append_string.

That might be more clear perhaps, but when you initialize an array
like that in C, the last element is propagated for the whole array.

What C compiler are you using?  The last element is /not/ propagated
in C.  The rest of the array will be initialized to zero, which is the
default for variables declared as being static.  Actually, the
explicit initialization to zero is redundant and actually causes the
size of the resulting executable to increase.  See
http://people.redhat.com/drepper/dsohowto.pdf for a better explanation
than I could give here.

 nikolai

Reply via email to