How to change stack size ou to clean it!

David Korn dkorn@pixelpower.com
Tue Apr 3 02:34:00 GMT 2001


-----Original Message-----
From: Simon Pesant [ mailto:pesantsi@hotmail.com ]
Sent: 02 April 2001 18:52

>When you use Codewarrior (versions r6 and earlier, as of this article's
>publishing date), the call stack is not always immediately cleaned up when
>a function returns. As a result, you can get a stack overflow if you
>repeatedly call another function from within one function in certain
>circumstances. To work around this, set the stack_cleanup pragma to "on".

>Is there something like that in gcc???

   Simon, these sorts of questions should really be asked either on the
gcc-help mailing list or even better on the newsgroups gnu.gcc.help or 
gnu.g++.help.  However it's a nice sunny day, so here's the answer, which
you would have seen had you familiarized yourself with the section of the
manual dealing with command line options:

8<------------
-fno-defer-pop 
Always pop the arguments to each function call as soon as that function
returns. For machines which must pop arguments after a function call, the
compiler normally lets arguments accumulate on the stack for several
function calls and pops them all at once. 
8<------------

  cheers,
      DaveK
--
"screams erupted at a Seattle hotel where Microsoft founder Bill Gates was
addressing an education and technology conference. He was whisked away as
his audience bolted for the exits. Some audience members were knocked down
by others trying to get out."
       -- CNN 2/28/01 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the Gcc mailing list