This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stack memory


On Oct 21, 2005, at 8:05 AM, Ivan Novick wrote:
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.

Yup.


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

Yes, it usually will. If you require that it not, use a different function and use noline.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]