diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-08 23:41:21 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-08 23:41:21 +0000 |
commit | 2e3bc123c86bc34472ec6c28f12f1f7d532e1915 (patch) | |
tree | e813322b0c544ad6765cf8b4c6af8958787846b1 /gcc/c-decl.c | |
parent | c42e0e2d591a203e8cfedb867b324e3938c890f0 (diff) | |
download | gcc-2e3bc123c86bc34472ec6c28f12f1f7d532e1915.tar.gz |
PR c/28504
* c-tree.h (struct c_arg_info): Add pending_sizes.
* c-parser.c (c_parser_parms_declarator,
c_parser_parms_list_declarator): Initialize pending_sizes.
* c-decl.c (get_parm_info): Initialize pending_sizes.
(get_parm_info): Set pending_sizes.
(grokdeclarator): Call put_pending_sizes for parameters for
function definition only.
testsuite:
* gcc.dg/vla-10.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index cf89191ae2e..cbd356f9cef 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4420,6 +4420,8 @@ grokdeclarator (const struct c_declarator *declarator, inner layer of declarator. */ arg_info = declarator->u.arg_info; arg_types = grokparms (arg_info, really_funcdef); + if (really_funcdef) + put_pending_sizes (arg_info->pending_sizes); /* Type qualifiers before the return type of the function qualify the return type, not the function type. */ @@ -4981,6 +4983,7 @@ get_parm_info (bool ellipsis) arg_info->tags = 0; arg_info->types = 0; arg_info->others = 0; + arg_info->pending_sizes = 0; arg_info->had_vla_unspec = current_scope->had_vla_unspec; /* The bindings in this scope must not get put into a block. @@ -5136,6 +5139,7 @@ get_parm_info (bool ellipsis) arg_info->tags = tags; arg_info->types = types; arg_info->others = others; + arg_info->pending_sizes = get_pending_sizes (); return arg_info; } |