Inlining, nested functions, and VLAs

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Mon Nov 1 11:19:00 GMT 2004


    > Suppose we have a function F with a nested function Q.  Q has one
    > argument, which we'll call P, of type T.  But T depends on some
    > variables in F and F contains a call to Q, with, say, value V.

    Would you please clarify with an example what you mean by "T depends
    on some variables in F"? I assume you cannot do this in C, right?

You can in GNU C, but it'd be a more than a bit pathalogical:

	int
	F (int i)
	{
	   int j = i * 7 + 23;
	   struct foo {int f1[j]; int f2;} V;
	   int Q (struct foo P) { return P.f2; }

	   return Q (V);
	}



More information about the Gcc mailing list