2005-08-26 Mark Mitchell <mark@codesourcery.com>
+ PR c++/19004
+ * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
+ (type_dependent_expression_p): Allow BASELINKs whose associated
+ functions are simply a FUNCTION_DECL.
+
PR c++/23491
* cp-tree.h (build_vec_init): Adjust prototype.
* init.c (perform_member_init): Adjust call to build_vec_init.
default initialization of vector elements when set.
* typeck.c (build_modify_expr): Adjust call to build_vec_init.
- PR c++/19004
- * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
- (type_dependent_expression_p): Allow BASELINKs whose associated
- functions are simply a FUNCTION_DECL.
-
2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20817
|| TREE_CODE (t) == TEMPLATE_PARM_INDEX
|| TREE_CODE (t) == OVERLOAD
|| TREE_CODE (t) == BASELINK
+ || TREE_CODE (t) == IDENTIFIER_NODE
|| CONSTANT_CLASS_P (t))
dependent_p = (type_dependent_expression_p (t)
|| value_dependent_expression_p (t));
return true;
expression = TREE_OPERAND (expression, 0);
}
- gcc_assert (TREE_CODE (expression) == OVERLOAD);
+ gcc_assert (TREE_CODE (expression) == OVERLOAD
+ || TREE_CODE (expression) == FUNCTION_DECL);
while (expression)
{
2005-08-26 Mark Mitchell <mark@codesourcery.com>
+ PR c++/19004
+ * g++.dg/template/nontype13.C: New test.
+
PR c++/23491
* g++.dg/init/new14.C: New test.
* g++.dg/expr/anew1.C: Do not XFAIL.
--- /dev/null
+// PR c++/19004
+
+template<typename T>
+struct Dummy
+{
+ void evil()
+ {
+ this->template tester<true>();
+ }
+
+ template<bool B>
+ void tester()
+ {
+ bar<evil>()(); // { dg-error "argument" }
+ }
+ template<bool B>
+ struct bar
+ {
+ void operator()()
+ { }
+ };
+};
+
+int main()
+{
+ Dummy<int> d;
+ d.tester<true> (); // { dg-error "instantiated" }
+}
+