Subject: Re: Question about initializing variables
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
List: tech-userlevel
Date: 04/08/1996 14:52:14
> On Sun, 7 Apr 1996 20:41:09 -0400 
>  "Stephen J. Roznowski" <sjr@zombie.ncsc.mil> wrote:
> 
>  > Not wanting to start a religious war, but should send-prs be submitted
>  > for this type of stuff? i.e.
>  > 
>  > 	...
>  > 	/* counters */
>  > 	long ntransmitted = 0;
>  > 	...
>  > 	main(argc, argv)
>  > 	...
> 
> Doing this would place the variable int the data segment ... that could 
> nickel-and-dime us into a lot of extra on-disk code bloat.

And not only that, it would have no useful effect!

BSS variables are defined to have a starting value of zero.
(I forget where that's defined; maybe ANSI... in any case, where it
is, they're most likely called unintialized globals, or something...)


In other words, as charles said: "It's not a bug."


cgd