This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inlining vs the stack
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: berndj at prism dot co dot za (Bernd Jendrissek)
- Cc: ian at airs dot com (Ian Lance Taylor), mrs at apple dot com (Mike Stump), pkoning at equallogic dot com (Paul Koning), dalej at apple dot com, gcc at gcc dot gnu dot org, jh at suse dot cz
- Date: Sun, 14 Aug 2005 12:06:52 -0400 (EDT)
- Subject: Re: Inlining vs the stack
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Fri, Aug 12, 2005 at 02:16:39PM -0700, Ian Lance Taylor wrote:
> > Mike Stump <mrs@apple.com> writes:
> > > X can be run time selectable, OMF selectable, OS defined...
> >
> > No.
> >
> > Making the stack bigger by inlining is no different from making it
> > bigger by declaring and using more local variables or calls to alloca.
>
> void killme(void)
> {
> int x[1000000000000000000]; /* Let's kill 64-bitters too. */
> int i;
> for (i = 0; i < sizeof (x) / sizeof (x[0]); i++) {
> printf("%d\n", x[i]);
> }
> }
It would be better if you used abort instead which will kill the problem
in easier/better way.
-- Pinski