minimal nested block for declarations

Derek M Jones <>
31 Oct 2003 22:43:39 -0500

          From comp.compilers

Related articles
minimal nested block for declarations (Derek M Jones) (2003-10-31)
Re: minimal nested block for declarations (Jeff Kenton) (2003-11-21)
| List of all articles for this month |

From: Derek M Jones <>
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


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.