PR c++/27821
* decl.c (grokdeclarator): Return error_mark_node on
invalid uses of the scope resolution operator.
From-SVN: r114899
PR c++/27805
* typeck2.c (build_m_component_ref): Use error_operand_p.
+
+ PR c++/27821
+ * decl.c (grokdeclarator): Return error_mark_node on
+ invalid uses of the scope resolution operator.
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
{
/* Something like struct S { int N::j; }; */
error ("invalid use of %<::%>");
- decl = NULL_TREE;
+ return error_mark_node;
}
else if (TREE_CODE (type) == FUNCTION_TYPE)
{
PR c++/27805
* g++.dg/parse/ptrmem6.C: New test.
+
+ PR c++/27821
+ * g++.dg/template/error22.C: New test.
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
--- /dev/null
+//PR c++/27821
+
+struct A
+{
+ template<void (A::*)()> struct B {};
+ void ::foo(); // { dg-error "invalid use" }
+ B<&A::foo> b; // { dg-errror "incomplete type|template argument" }
+};
+