diff options
author | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-11-20 05:09:34 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-11-20 05:09:34 +0000 |
commit | 78a40378a9f48026652466b824b68f0a949f39ee (patch) | |
tree | 2669e6486e7ce424050fd284519d6fa62f1413da /gcc/cp/semantics.c | |
parent | 34f62c3635821b9a5501031de5e3af0ef93d4189 (diff) | |
download | gcc-78a40378a9f48026652466b824b68f0a949f39ee.zip gcc-78a40378a9f48026652466b824b68f0a949f39ee.tar.gz gcc-78a40378a9f48026652466b824b68f0a949f39ee.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |