+2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/31446
+ * pt.c (current_template_args): Do not change TREE_LIST elements
+ with a TREE_VALUE of error_mark_node.
+
2007-10-16 Mark Mitchell <mark@codesourcery.com>
* typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
TREE_TYPE (t) = type;
}
}
+ TREE_VEC_ELT (a, i) = t;
}
- TREE_VEC_ELT (a, i) = t;
}
}
+2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/31446
+ * g++.dg/template/void11.C: New.
+ * g++.dg/template/void2.C: Adjust error markers.
+ * g++.dg/template/void10.C: Likewise.
+ * g++.dg/template/crash55.C: Likewise.
+
2007-10-16 Mark Mitchell <mark@codesourcery.com>
* g++.dg/opt/const5.C: New test.
//PR c++/27668
template<typename class T, T = T()> // { dg-error "nested-name-specifier|two or more|valid type" }
-struct A {}; // { dg-error "definition|template" }
+struct A {};
template<int> void foo(A<int>); // { dg-error "mismatch|constant|template argument" }
template<typename> struct B {};
-B<int> b; // { dg-error "template argument|invalid type" }
+B<int> b;
--- /dev/null
+// PR c++/31446
+
+template<void> struct A // { dg-error "valid type" }
+
+{
+ template<int> friend void foo();
+};
+
+void bar()
+{
+ foo<0>(); // { dg-error "not declared|primary-expression" }
+}
template<int> struct A
{
- template<void> friend class X; // { dg-error "void" }
+ template<void> friend class X; // { dg-error "void|valid type" }
};
-A<0> a;
+A<0> a;