/cp
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
* decl.c (grokdeclarator): Set type to error_mark_node
upon error about template placeholder type non followed
by a simple declarator-id.
/testsuite
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
* g++.dg/cpp1z/class-deduction66.C: New.
From-SVN: r270603
-2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/90173
+ * decl.c (grokdeclarator): Set type to error_mark_node
+ upon error about template placeholder type non followed
+ by a simple declarator-id.
+
+2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
min_location.
error_at (typespec_loc, "template placeholder type %qT must be followed "
"by a simple declarator-id", type);
inform (DECL_SOURCE_LOCATION (tmpl), "%qD declared here", tmpl);
+ type = error_mark_node;
}
staticp = 0;
-2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/90173
+ * g++.dg/cpp1z/class-deduction66.C: New.
+
+2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/trailing1.C: New.
--- /dev/null
+// PR c++/90173
+// { dg-do run { target c++17 } }
+
+template <typename T> struct A { };
+
+A(int) -> A<int>;
+
+namespace decl {
+ A (*fp)() = 0; // { dg-error "placeholder" }
+}