Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!MARCOZ.BOLTZ.CS.CMU.EDU!marcoz From: marcoz@MARCOZ.BOLTZ.CS.CMU.EDU (Marco Zagha) Newsgroups: comp.lang.c Subject: return(struct) implementation Message-ID: <4425@pt.cs.cmu.edu> Date: 7 Mar 89 01:42:52 GMT Organization: Carnegie-Mellon University, CS/RI Lines: 15 Can anybody explain how returning a structure from a function is typically implemented. Assume it is too big to use registers. Is it returned on the stack? Where does the return structure go in relation to parameters to the function? For a stack that grows downward, is the return value above the parameters, below the parameters, or does the return statement overwrite the parameters? Since I suspect this is implementation dependent, please specify what implementation you are describing. == Marco (marcoz@cs.cmu.edu) P.S. I am *not* writing any code that depends on the implementation. I am just curious. --