mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-07 23:07:29 +08:00
error.c (dump_decl): Handle LOOKUP_EXPR.
* 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
This commit is contained in:
parent
0fe09481b0
commit
0fb9f1c39b
@ -1,3 +1,18 @@
|
|||||||
|
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>
|
Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
|
||||||
|
|
||||||
* typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
|
* typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
|
||||||
|
@ -797,6 +797,10 @@ dump_decl (t, v)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LOOKUP_EXPR:
|
||||||
|
OB_PUTID (TREE_OPERAND (t, 0));
|
||||||
|
break;
|
||||||
|
|
||||||
case LABEL_DECL:
|
case LABEL_DECL:
|
||||||
OB_PUTID (DECL_NAME (t));
|
OB_PUTID (DECL_NAME (t));
|
||||||
break;
|
break;
|
||||||
|
@ -1075,12 +1075,14 @@ coerce_template_parms (parms, arglist, in_decl)
|
|||||||
{
|
{
|
||||||
tree t = tsubst (TREE_TYPE (parm), vec,
|
tree t = tsubst (TREE_TYPE (parm), vec,
|
||||||
TREE_VEC_LENGTH (vec), in_decl);
|
TREE_VEC_LENGTH (vec), in_decl);
|
||||||
if (processing_template_decl)
|
if (processing_template_decl &&
|
||||||
|
(uses_template_parms (arg) || uses_template_parms (t)))
|
||||||
val = arg;
|
val = arg;
|
||||||
else
|
else
|
||||||
val = digest_init (t, arg, (tree *) 0);
|
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,
|
/* 14.2: Other template-arguments must be constant-expressions,
|
||||||
|
@ -642,7 +642,7 @@ build_dynamic_cast (type, expr)
|
|||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
|
|
||||||
if (processing_template_decl)
|
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));
|
return convert_from_reference (build_dynamic_cast_1 (type, expr));
|
||||||
}
|
}
|
||||||
|
@ -5264,7 +5264,8 @@ build_static_cast (type, expr)
|
|||||||
|
|
||||||
if (processing_template_decl)
|
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;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5356,7 +5357,8 @@ build_reinterpret_cast (type, expr)
|
|||||||
|
|
||||||
if (processing_template_decl)
|
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;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5456,7 +5458,8 @@ build_const_cast (type, expr)
|
|||||||
|
|
||||||
if (processing_template_decl)
|
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;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user