This is the mail archive of the gcc-patches@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]

Re: [PATCH] variable size arrays in nested functions


On Fri, Feb 09, 2001 at 01:17:28PM +0100, Jakub Jelinek wrote:
> 	* c-decl.c (push_parm_decl): Call grokdeclarator always with
> 	current_function_decl == 0, even for nested functions.

This seems strange.

> +int b;
> +int foo (void)
> +{
> +  int x[b];
> +  int bar (int t[b])
> +  {

What about

  int foo(int b)

instead?  Doesn't dropping to no context cause this to fail?


r~


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