/cp
2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36404
* pt.c (push_template_decl_real): Consistently return error_mark_node
on error.
/testsuite
2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36404
* g++.dg/template/crash79.C: New.
* g++.dg/other/pr28114.C: Adjust.
From-SVN: r136295
+2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/36404
+ * pt.c (push_template_decl_real): Consistently return error_mark_node
+ on error.
+
2008-06-02 Tomas Bily <tbily@suse.cz>
* typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
member_template_p = true;
if (TREE_CODE (decl) == TYPE_DECL
&& ANON_AGGRNAME_P (DECL_NAME (decl)))
- error ("template class without a name");
+ {
+ error ("template class without a name");
+ return error_mark_node;
+ }
else if (TREE_CODE (decl) == FUNCTION_DECL)
{
if (DECL_DESTRUCTOR_P (decl))
+2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/36404
+ * g++.dg/template/crash79.C: New.
+ * g++.dg/other/pr28114.C: Adjust.
+
2008-06-02 Daniel Kraft <d@domob.eu>
* finalize_1.f08: New test.
void bar()
{
- foo<0>(0); // { dg-error "" }
+ foo<0>(0);
}
--- /dev/null
+// PR c++/36404
+
+struct A
+{
+ A(int);
+ template<int> enum { e }; // { dg-error "template" }
+};
+
+A a(A::e); // { dg-error "not a member" }