On Tuesday 23 February 2010 12:02:55 Timo wrote:
> Harald Becker wrote:
> > Just a question about initialization of static variables in busybox: Is
> > it proved that those variables get initialized to zero even without any
> > initializer? In the past I had several troubles with programs on
> > different systems relying on this assumption.
>
> I don't know too much about busybox in particular but as nobody else
> have answered...
>
> I would say that it is the responsibility of the compiler toolchain to
> make sure that static, not-explicitly-initialized variables are cleared
> before entry into the 'main'. It is a requirement of the C-language. So,
> if the variables are not cleared, the toolchain is horribly broken.

(Could you tell me where in the C language speci it's required?  I checked the 
c99-draft.html I have and couldn't find it, but that doesn't mean much.  It 
_seems_ like something C99 would require, but I haven't tracked down where 
yet.)

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to