[Top] [All Lists]

Re: Saving arguments on the stack

To: "Knittel, Brian" <>
Subject: Re: Saving arguments on the stack
From: Ralf Baechle <>
Date: Tue, 22 Nov 2005 11:38:01 +0000
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/
On Mon, Nov 21, 2005 at 06:59:20PM -0800, Knittel, Brian wrote:

> I'd like to force the compiler to store arguments on the stack with otherwise 
> optimized code.
> I found a refernce in the archives (form 2001) for using -0 (no 
> optimization). Has anyone found another way to do this?

-O is optimization - same as -O1.

Gcc will save all arguments to the stack for variadic functions (like:
int printf(const char *fmt, ...)) when using somewhat older compiler - I
think before gcc 3.2 or so.  Newer compilers will only save argument
one and up.  Maybe that's good enough?


<Prev in Thread] Current Thread [Next in Thread>