summaryrefslogtreecommitdiff
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-24 15:30:37 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-24 15:30:37 +0000
commit3a47b66be0bd7d293c8337e74aecdb95abe4fcb8 (patch)
tree0e20c06d9c4524d1e9acb4a0a01a1f9474f0fd26 /gcc/c-parse.in
parent065aeb1988efa9334bfb78b762ad2477ea1e371f (diff)
downloadgcc-3a47b66be0bd7d293c8337e74aecdb95abe4fcb8.tar.gz
* c-parse.in (array_declarator): Use expr_no_commas.
Fixes PR c/11943. testsuite: * gcc.dg/c99-arraydecl-2.c: New test. PR c/11943. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72900 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r--gcc/c-parse.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index c7850177cb4..22bab99077a 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -1973,16 +1973,16 @@ direct_absdcl1:
/* The [...] part of a declarator for an array type. */
array_declarator:
- '[' maybe_type_quals_attrs expr ']'
+ '[' maybe_type_quals_attrs expr_no_commas ']'
{ $$ = build_array_declarator ($3, $2, 0, 0); }
| '[' maybe_type_quals_attrs ']'
{ $$ = build_array_declarator (NULL_TREE, $2, 0, 0); }
| '[' maybe_type_quals_attrs '*' ']'
{ $$ = build_array_declarator (NULL_TREE, $2, 0, 1); }
- | '[' STATIC maybe_type_quals_attrs expr ']'
+ | '[' STATIC maybe_type_quals_attrs expr_no_commas ']'
{ $$ = build_array_declarator ($4, $3, 1, 0); }
/* declspecs_nosc_nots is a synonym for type_quals_attrs. */
- | '[' declspecs_nosc_nots STATIC expr ']'
+ | '[' declspecs_nosc_nots STATIC expr_no_commas ']'
{ $$ = build_array_declarator ($4, $2, 1, 0); }
;