* error.c (dump_decl): Handle LOOKUP_EXPR.
Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
* rtti.c (build_dynamic_cast): Copy the cast-to type to the
permanent obstack if we are processing a template decl.
* typeck.c (build_static_cast): Likewise.
(build_const_cast): Likewise.
(build_reinterpret_cast): Likewise.
* pt.c (coerce_template_parms): Coerce some expressions, even
when processing_template_decl.
From-SVN: r17001
+Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * error.c (dump_decl): Handle LOOKUP_EXPR.
+
+Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
+
+ * rtti.c (build_dynamic_cast): Copy the cast-to type to the
+ permanent obstack if we are processing a template decl.
+ * typeck.c (build_static_cast): Likewise.
+ (build_const_cast): Likewise.
+ (build_reinterpret_cast): Likewise.
+
+ * pt.c (coerce_template_parms): Coerce some expressions, even
+ when processing_template_decl.
+
Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
* typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
}
break;
+ case LOOKUP_EXPR:
+ OB_PUTID (TREE_OPERAND (t, 0));
+ break;
+
case LABEL_DECL:
OB_PUTID (DECL_NAME (t));
break;
{
tree t = tsubst (TREE_TYPE (parm), vec,
TREE_VEC_LENGTH (vec), in_decl);
- if (processing_template_decl)
+ if (processing_template_decl &&
+ (uses_template_parms (arg) || uses_template_parms (t)))
val = arg;
else
val = digest_init (t, arg, (tree *) 0);
- if (val == error_mark_node || processing_template_decl)
+ if (val == error_mark_node
+ || (processing_template_decl && uses_template_parms (val)))
;
/* 14.2: Other template-arguments must be constant-expressions,
return error_mark_node;
if (processing_template_decl)
- return build_min (DYNAMIC_CAST_EXPR, type, expr);
+ return build_min (DYNAMIC_CAST_EXPR, copy_to_permanent (type), expr);
return convert_from_reference (build_dynamic_cast_1 (type, expr));
}
if (processing_template_decl)
{
- tree t = build_min (STATIC_CAST_EXPR, type, expr);
+ tree t = build_min (STATIC_CAST_EXPR, copy_to_permanent (type),
+ expr);
return t;
}
if (processing_template_decl)
{
- tree t = build_min (REINTERPRET_CAST_EXPR, type, expr);
+ tree t = build_min (REINTERPRET_CAST_EXPR,
+ copy_to_permanent (type), expr);
return t;
}
if (processing_template_decl)
{
- tree t = build_min (CONST_CAST_EXPR, type, expr);
+ tree t = build_min (CONST_CAST_EXPR, copy_to_permanent (type),
+ expr);
return t;
}