PR c++/47705
* pt.c (convert_nontype_argument): Only call decay_conversion on
arrays.
From-SVN: r170795
+2011-03-08 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/47705
+ * pt.c (convert_nontype_argument): Only call decay_conversion on
+ arrays.
+
2011-03-08 Dodji Seketeli <dodji@redhat.com>
* name-lookup.c (binding_to_template_parms_of_scope_p): Only
/* Add the ADDR_EXPR now for the benefit of
value_dependent_expression_p. */
- if (TYPE_PTROBV_P (type))
+ if (TYPE_PTROBV_P (type)
+ && TREE_CODE (TREE_TYPE (expr)) == ARRAY_TYPE)
expr = decay_conversion (expr);
/* If we are in a template, EXPR may be non-dependent, but still
+2011-03-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/nontype21.C: New.
+
2011-03-08 Dodji Seketeli <dodji@redhat.com>
* g++.dg/lookup/template3.C: New test.
--- /dev/null
+// PR c++/47705
+
+template<char const * const x> class Something { };
+
+extern char const xyz;
+
+class SomethingElse:public Something<xyz> { }; // { dg-error "xyz. is a variable" }