This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: init variables
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Max <Massimiliano dot Didomenico at dlr dot de>, gcc-help at gcc dot gnu dot org
- Date: Thu, 02 Oct 2003 09:30:50 -0500
- Subject: Re: init variables
Hi Max,
Static variables are initialized to zero.
Stack variables are initialized to garbage.
Heap variables are initialized to garbage (although the original extant from the OS used by the heap is initially initialized to zero, in all modern OS's).
No compiler option needed, it's automatic.
HTH,
--Eljay