aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2017-12-12 10:38:09 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2017-12-12 10:38:09 +0000
commit49e6a6c023d1b91c90d3fbdf16adf20dff246156 (patch)
tree36ecf67aba857eb090279ba388496485a9f879b7 /gcc/c/c-decl.c
parent6c939c2e9c6c3437fd5664a163890d3006dba45c (diff)
downloadgcc-49e6a6c023d1b91c90d3fbdf16adf20dff246156.zip
gcc-49e6a6c023d1b91c90d3fbdf16adf20dff246156.tar.gz
gcc-49e6a6c023d1b91c90d3fbdf16adf20dff246156.tar.bz2
re PR c/82679 (Uses of typedefs of arrays of _Atomic-qualified types are rejected)
PR c/82679 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp. * gcc.dg/c11-atomic-5.c: New test. From-SVN: r255577
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r--gcc/c/c-decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 4a36c54..7ade2d6 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -5813,7 +5813,7 @@ grokdeclarator (const struct c_declarator *declarator,
of typedefs or typeof) must be detected here. If the qualifier
is introduced later, any appearance of applying it to an array is
actually applying it to an element of that array. */
- if (atomicp && TREE_CODE (type) == ARRAY_TYPE)
+ if (declspecs->atomic_p && TREE_CODE (type) == ARRAY_TYPE)
error_at (loc, "%<_Atomic%>-qualified array type");
/* Warn about storage classes that are invalid for certain