From 78a40378a9f48026652466b824b68f0a949f39ee Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 20 Nov 2001 05:09:34 +0000 Subject: re PR c++/4629 (non-constant `sizeof (void*)' cannot be used as template argument) * dump.c (dump_op): New function. (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, PR4629 * semantics.c (finish_sizeof): Make sure that expression created while processing a template do not have a type. (finish_alignof): Likewise. * typeck.c (c_sizeof): Likewise. (expr_sizeof): Likewise. From-SVN: r47201 --- gcc/cp/semantics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/cp/semantics.c') diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 1842974..ae1e597 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2196,7 +2196,7 @@ finish_sizeof (t) tree t; { if (processing_template_decl) - return build_min (SIZEOF_EXPR, sizetype, t); + return build_min_nt (SIZEOF_EXPR, t); return TYPE_P (t) ? c_sizeof (t) : expr_sizeof (t); } @@ -2209,7 +2209,7 @@ finish_alignof (t) tree t; { if (processing_template_decl) - return build_min (ALIGNOF_EXPR, sizetype, t); + return build_min_nt (ALIGNOF_EXPR, t); return TYPE_P (t) ? c_alignof (t) : c_alignof_expr (t); } -- cgit v1.1