PR c++/65625
* decl.c (make_typename_type): Handle seeing a variable template.
From-SVN: r221842
+2015-04-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/65625
+ * decl.c (make_typename_type): Handle seeing a variable template.
+
2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56100
if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
{
name = TREE_OPERAND (name, 0);
- if (TREE_CODE (name) == TEMPLATE_DECL)
+ if (DECL_TYPE_TEMPLATE_P (name))
name = TREE_OPERAND (fullname, 0) = DECL_NAME (name);
- else if (TREE_CODE (name) == OVERLOAD)
+ if (TREE_CODE (name) != IDENTIFIER_NODE)
{
if (complain & tf_error)
error ("%qD is not a type", name);
--- /dev/null
+// PR c++/65625
+// { dg-do compile { target c++14 } }
+
+namespace std {
+ template <typename T> int declval;
+ typename std::declval<> d; // { dg-error "not a type" }
+}