Commit faa16e44 by Paolo Carlini Committed by Paolo Carlini

decl.c (grokdeclarator): For an erroneous template parameter propagate error_mark_node as type.

/cp
2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokdeclarator): For an erroneous template parameter
	propagate error_mark_node as type.

/testsuite
2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/template/crash81.C: Update.

From-SVN: r226054
parent 6998b929
2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): For an erroneous template parameter
propagate error_mark_node as type.
2015-07-20 Marek Polacek <polacek@redhat.com>
PR c++/55095
......
......@@ -9315,7 +9315,12 @@ grokdeclarator (const cp_declarator *declarator,
warning (OPT_Wreturn_type,
"ISO C++ forbids declaration of %qs with no type", name);
type = integer_type_node;
if (type_was_error_mark_node && template_parm_flag)
/* FIXME we should be able to propagate the error_mark_node as is
for other contexts too. */
type = error_mark_node;
else
type = integer_type_node;
}
ctype = NULL_TREE;
......
2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/template/crash81.C: Update.
2015-07-21 Vladimir Makarov <vmakarov@redhat.com>
PR ipa/66424.
......
......@@ -2,6 +2,5 @@
struct A
{
template<T::X> struct X; // { dg-error "'T' has not been declared" "T" }
// { dg-bogus "declaration" "" { xfail *-*-* } 5 }
template<T::X> struct X; // { dg-error "'T' has not been declared" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment