minimal nested block for declarations

Derek M Jones <derek@knosof.co.uk>
31 Oct 2003 22:43:39 -0500

          From comp.compilers

Related articles
minimal nested block for declarations derek@knosof.co.uk (Derek M Jones) (2003-10-31)
Re: minimal nested block for declarations Jeffrey.Kenton@comcast.net (Jeff Kenton) (2003-11-21)
| List of all articles for this month |
From: Derek M Jones <derek@knosof.co.uk>
Newsgroups: comp.compilers
Date: 31 Oct 2003 22:43:39 -0500
Organization: Knowledge Software
Keywords: syntax, design, question
Posted-Date: 31 Oct 2003 22:43:38 EST

All,


In C (and other languages) most local declarations appear in the
outermost block of the body of the function definition.


Does anybody know of any studies that have analysed source to
investigate the extent to which different declarations can be moved
into some nested block?


For instance, in:


void f(void)
{
int a;


      {
        /* only references to a appear in this block */
      }
}


analysis would report that the declaration of a could
be moved to a nested block.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.