scoping question

Ian Lance Taylor
Tue Aug 11 20:19:00 GMT 2009

Todd <> writes:

> My question is, is it possible, from within the inner scope, to refer
> to the variables and labels defined in the outer scope (whose names
> have been overridden)

If the name of the variable has been overridden, then you can not refer
to the object directly.  This is the same case as

    int i;
      int i;
      i = 1; /* Refers to inner 'i', not outer one.  The outer 'i' is
                hidden.  */

Of course you could use a pointer, pass a parameter to the inner
function, etc.


More information about the Gcc-help mailing list