This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: .bss section and uninitialised variables
>>>>> "Kevin" == Kevin Puetz <puetzk@puetzk.org> writes:
Kevin> In C/C++/most languages, you should not make any assumption
Kevin> about the initial value of variables - it is undefined by the
Kevin> language, and usually undefined on the platform as well.
Huh? Last I heard, file or global scope variables are defined to be
initially zero unless otherwise initialized, that's why they are
supposed to go to .bss.
What you said is correct for automatic variables, though.
paul