This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inlining, nested functions, and VLAs


    > 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);
	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]