+2011-08-23 Jason Merrill <jason@redhat.com>
+
+ * typeck2.c (build_functional_cast): Don't try to avoid calling
+ build_value_init.
+ * pt.c (instantiate_class_template_1): Don't copy TYPE_HAS_* flags.
+
2011-08-23 Jason Merrill <jason@redhat.com>
PR c++/49045
input_location = DECL_SOURCE_LOCATION (TYPE_NAME (type)) =
DECL_SOURCE_LOCATION (typedecl);
- TYPE_HAS_USER_CONSTRUCTOR (type) = TYPE_HAS_USER_CONSTRUCTOR (pattern);
- TYPE_HAS_NEW_OPERATOR (type) = TYPE_HAS_NEW_OPERATOR (pattern);
- TYPE_HAS_ARRAY_NEW_OPERATOR (type) = TYPE_HAS_ARRAY_NEW_OPERATOR (pattern);
- TYPE_GETS_DELETE (type) = TYPE_GETS_DELETE (pattern);
- TYPE_HAS_COPY_ASSIGN (type) = TYPE_HAS_COPY_ASSIGN (pattern);
- TYPE_HAS_CONST_COPY_ASSIGN (type) = TYPE_HAS_CONST_COPY_ASSIGN (pattern);
- TYPE_HAS_COPY_CTOR (type) = TYPE_HAS_COPY_CTOR (pattern);
- TYPE_HAS_CONST_COPY_CTOR (type) = TYPE_HAS_CONST_COPY_CTOR (pattern);
- TYPE_HAS_DEFAULT_CONSTRUCTOR (type) = TYPE_HAS_DEFAULT_CONSTRUCTOR (pattern);
- TYPE_HAS_CONVERSION (type) = TYPE_HAS_CONVERSION (pattern);
TYPE_PACKED (type) = TYPE_PACKED (pattern);
TYPE_ALIGN (type) = TYPE_ALIGN (pattern);
TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (pattern);
void type, creates an rvalue of the specified type, which is
value-initialized. */
- if (parms == NULL_TREE
- /* If there's a user-defined constructor, value-initialization is
- just calling the constructor, so fall through. */
- && !TYPE_HAS_USER_CONSTRUCTOR (type))
+ if (parms == NULL_TREE)
{
exp = build_value_init (type, complain);
exp = get_target_expr_sfinae (exp, complain);
+2011-08-23 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/crash7.C: Adjust expected errors.
+
2011-08-23 Jason Merrill <jason@redhat.com>
PR c++/49045
// PR c++/10108: ICE in tsubst_decl for error due to non-existence
// nested type.
-template <typename> struct A // { dg-message "A.void.::A.const A" }
+template <typename> struct A
{
template <typename> A(typename A::X) {} // { dg-error "no type" }
};
-A<void> a; // { dg-error "required|no match" }
-// { dg-prune-output "note" }
+// We currently don't give the "no match" error because we don't add the
+// invalid constructor template to TYPE_METHODS.
+A<void> a; // { dg-message "required" }