Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site uiucdcsb Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsb!robison From: robison@uiucdcsb.CS.UIUC.EDU Newsgroups: net.lang.c Subject: Re: Stack frames Message-ID: <139200021@uiucdcsb> Date: Mon, 17-Feb-86 11:44:00 EST Article-I.D.: uiucdcsb.139200021 Posted: Mon Feb 17 11:44:00 1986 Date-Received: Wed, 19-Feb-86 00:58:10 EST References: <463@ur-helheim.UUCP> Lines: 22 Nf-ID: #R:ur-helheim.UUCP:463:uiucdcsb:139200021:000:481 Nf-From: uiucdcsb.CS.UIUC.EDU!robison Feb 17 10:44:00 1986 The output from C compilers I have seen indicates there is no penalty for {} blocks with declarations. All allocation can be done at the function entry. I.e., the source code: int f(x,y) int x,y; { int a,b; ... { int m,n; ... } ... } generates assembly code which allocates a,b,m, and n on the stack upon entry. The only difference between a,b and m,n is that m,n is visible only within the inner block. - Arch Robison