Re: Automaticly eliminating redundant zero initialisers

From: Martin v. Loewis (martin@loewis.home.cs.tu-berlin.de)
Date: Mon May 01 2000 - 07:54:39 EST


> Soon as you depend on this some OS dude will fill bss with -1s so he can
> tell what was used... or some such. Seems like a bad idea to depend on
> bss being anything at all.

Of course, that OS dude would then break ISO C compatibility for his
system. The C standard requires that globals are zero-initialized
unless they are initialized explicitly. Depending on zero
initialization is as good as depending on initialization at all, at
least in standard C.

Regards,
Martin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:08 EST