This is the mail archive of the gcc-help@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] |
RANJITH KUMAR KASUKURTHI wrote:From the point of view of code running inside a function, the location of the return address typically does vary with the number of local variables. It does not vary with the number of arguments.
3) The location where that return address is stored on stack may vary depending upon number of arguments passed to the function, or number of
local variables inside the function, or whether the function is returning
a value or not........
Not usually, no. On those machines that pass the return address on the stack,
that address is on the top.
Often the compiler can't know where "everything" (relevant to the current stack frame) is, because it often can't know how many arguments were passed.How __builtin_return_address() function knows where exactly the return
address is stored on stack????
The compiler knows where everything is: the return address is nothing special.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |