+2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58568
+ * lambda.c (begin_lambda_type): Check return value of xref_tag
+ for error_mark_node; tidy.
+ * decl.c (grokdeclarator): Tweak error message.
+
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58665
&& !uniquely_derived_from_p (ctype,
current_class_type))
{
- error ("type %qT is not derived from type %qT",
- ctype, current_class_type);
+ error ("invalid use of qualified-name %<%T::%D%>",
+ qualifying_scope, decl);
return error_mark_node;
}
}
name,
/*scope=*/ts_lambda,
/*template_header_p=*/false);
+ if (type == error_mark_node)
+ return error_mark_node;
}
/* Designate it as a struct so that we can use aggregate initialization. */
/* Start the class. */
type = begin_class_definition (type);
- if (type == error_mark_node)
- return error_mark_node;
return type;
}
+2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58568
+ * g++.dg/cpp0x/lambda/lambda-ice10.C: New.
+ * g++.old-deja/g++.mike/misc9.C: Adjust.
+
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58665
--- /dev/null
+// PR c++/58568
+// { dg-do compile { target c++11 } }
+
+template<int> struct A
+{
+ static const int i;
+ template<int N> const int A<N>::i = []{ return 0; }(); // { dg-error "invalid use" }
+};
class foo {
public:
- int bee::bar; // { dg-error "not derived" } you cannot do this
+ int bee::bar; // { dg-error "invalid use" } you cannot do this
int me();
};