Newsgroup: comp.lang.c++
Subject: function stack frames may overlap?
From: Good Guy <pooria.gh@...>
Date: Fri, 28 Jun 2013 02:09:56 -0700 (PDT)
hey there
regarding following info at this address(http://en.wikipedia.org/wiki/Call_stack#Overlap):
For some purposes, the stack frame of a subroutine and that of its caller can be considered to overlap, the overlap consisting of the area where the parameters are passed from the caller to the callee. In some environments, the caller pushes each argument onto the stack, thus extending its stack frame, then invokes the callee. In other environments, the caller has a preallocated area at the top of its stack frame to hold the arguments it supplies to other subroutines it calls. This area is sometimes termed the outgoing arguments area or callout area. Under this approach, the size of the area is calculated by the compiler to be the largest needed by any called subroutine.
may a C++ compiler ever do that? I think of following case for example assuming it's not inlined and only variables in local scopes of its callers are passed to this function:
void bar(int & in){in++;}
Subject: function stack frames may overlap?
From: Good Guy <pooria.gh@...>
Date: Fri, 28 Jun 2013 02:09:56 -0700 (PDT)
hey there
regarding following info at this address(http://en.wikipedia.org/wiki/Call_stack#Overlap):
For some purposes, the stack frame of a subroutine and that of its caller can be considered to overlap, the overlap consisting of the area where the parameters are passed from the caller to the callee. In some environments, the caller pushes each argument onto the stack, thus extending its stack frame, then invokes the callee. In other environments, the caller has a preallocated area at the top of its stack frame to hold the arguments it supplies to other subroutines it calls. This area is sometimes termed the outgoing arguments area or callout area. Under this approach, the size of the area is calculated by the compiler to be the largest needed by any called subroutine.
may a C++ compiler ever do that? I think of following case for example assuming it's not inlined and only variables in local scopes of its callers are passed to this function:
void bar(int & in){in++;}
via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?30495-function-stack-frames-may-overlap&goto=newpost
View all the progranning help forums at:
http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums
No comments:
Post a Comment