/* Mark the DECL as a member of the current class. */
DECL_CONTEXT (decl) = current_class_type;
+ /* Check for bare parameter packs in the member variable declaration. */
+ if (TREE_CODE (decl) == FIELD_DECL
+ && !check_for_bare_parameter_packs (TREE_TYPE (decl)))
+ TREE_TYPE (decl) = error_mark_node;
+
/* [dcl.link]
A C language linkage is ignored for the names of class members
return;
}
- /* Keep track of functions declared with the "constructor" and
- "destructor" attribute. */
- c_record_cdtor_fn (fn);
-
/* We make a decision about linkage for these functions at the end
of the compilation. Until that point, we do not want the back
end to output them -- but we do want it to see the bodies of
Save the results, because later we won't be in the right context
for making these queries. */
if (CLASS_TYPE_P (inner_type)
- && (need_default_ctor || need_copy_ctor || need_copy_assignment))
+ && (need_default_ctor || need_copy_ctor || need_copy_assignment)
+ && !type_dependent_expression_p (t))
{
int save_errorcount = errorcount;
tree info;
return trait_expr;
}
+ complete_type (type1);
+ if (type2)
+ complete_type (type2);
+
/* The only required diagnostic. */
if (kind == CPTK_IS_BASE_OF
&& NON_UNION_CLASS_TYPE_P (type1) && NON_UNION_CLASS_TYPE_P (type2)
&& !same_type_ignoring_top_level_qualifiers_p (type1, type2)
- && !COMPLETE_TYPE_P (complete_type (type2)))
+ && !COMPLETE_TYPE_P (type2))
{
error ("incomplete type %qT not allowed", type2);
return error_mark_node;