aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2007-11-22 23:12:29 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2007-11-22 23:12:29 +0000
commit6ac0194d21d90e29832fd1c996ba23e6e183d328 (patch)
treef8959fdd1818cd96126e42cc4ebcbcb497abeb58 /gcc/c-decl.c
parentdf8702365b9124ee1b29f8a25ba23fa0982fa237 (diff)
downloadgcc-6ac0194d21d90e29832fd1c996ba23e6e183d328.zip
gcc-6ac0194d21d90e29832fd1c996ba23e6e183d328.tar.gz
gcc-6ac0194d21d90e29832fd1c996ba23e6e183d328.tar.bz2
re PR c/14050 ([DR289] c99 restrict doesn't work in abs declarator)
PR c/14050 * c-decl.c (set_array_declarator_inner): Don't give error for static or type qualifiers in abstract declarator. Remove abstract_p parameter. * c-tree.h (set_array_declarator_inner): Update prototype. * c-parser.c (c_parser_direct_declarator_inner): Update call to set_array_declarator_inner. * doc/standards.texi: Update for C99 TC3. testsuite: * gcc.dg/c99-arraydecl-1.c: Don't expect errors for static or type qualifiers in abstract declarator. From-SVN: r130362
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 5ddbcc0..bcf20e0 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3081,20 +3081,13 @@ build_array_declarator (tree expr, struct c_declspecs *quals, bool static_p,
/* Set the contained declarator of an array declarator. DECL is the
declarator, as constructed by build_array_declarator; INNER is what
- appears on the left of the []. ABSTRACT_P is true if it is an
- abstract declarator, false otherwise; this is used to reject static
- and type qualifiers in abstract declarators, where they are not in
- the C99 grammar (subject to possible change in DR#289). */
+ appears on the left of the []. */
struct c_declarator *
set_array_declarator_inner (struct c_declarator *decl,
- struct c_declarator *inner, bool abstract_p)
+ struct c_declarator *inner)
{
decl->declarator = inner;
- if (abstract_p && (decl->u.array.quals != TYPE_UNQUALIFIED
- || decl->u.array.attrs != NULL_TREE
- || decl->u.array.static_p))
- error ("static or type qualifiers in abstract declarator");
return decl;
}