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-tree.h | |
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-tree.h')
-rw-r--r-- | gcc/c-tree.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 3503c793a23..79579b0547a 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -309,6 +309,11 @@ struct c_arg_info { /* A list of non-parameter decls (notably enumeration constants) defined with the parameters. */ tree others; + /* A list of VLA sizes from the parameters. In a function + definition, these are used to ensure that side-effects in sizes + of arrays converted to pointers (such as a parameter int i[n++]) + take place; otherwise, they are ignored. */ + tree pending_sizes; /* True when these arguments had [*]. */ BOOL_BITFIELD had_vla_unspec : 1; }; |