/* Determine the type of the entity declared by recurring on the
declarator. */
- for (;
- declarator && declarator->kind != cdk_id;
- declarator = declarator->declarator)
+ for (; declarator; declarator = declarator->declarator)
{
const cp_declarator *inner_declarator;
tree attrs;
if (type == error_mark_node)
return error_mark_node;
- inner_declarator = declarator->declarator;
-
attrs = declarator->attributes;
if (attrs)
{
attr_flags);
}
+ if (declarator->kind == cdk_id)
+ break;
+
+ inner_declarator = declarator->declarator;
+
switch (declarator->kind)
{
case cdk_array:
--- /dev/null
+// PR c++/20673
+
+typedef void *voidp;
+
+struct S
+{
+ char a;
+ voidp __attribute__ ((aligned (16))) b;
+};
+
+struct T
+{
+ char a;
+ void *__attribute__ ((aligned (16))) b;
+};
+
+int f[sizeof (struct S) != sizeof (struct T) ? -1 : 1];