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: 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


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