stack memory

Ivan Novick Ivan.Novick@makoglobal.com
Fri Oct 21 15:13:00 GMT 2005


Hi,

With the sun compiler, the declared buffer is pushed onto the stack upon
entry into function foo and not only when it goes into scope.

Do you know if gcc will use the stack for the buffer if it never goes into scope?

function foo()
{
if ( debug > 0 )
	{
	char debug_buffer[4096];
	}
}

Thanks,
Ivan



More information about the Gcc mailing list