diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-04 09:36:20 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-04 09:36:20 +0000 |
commit | e47f82ba6f93fb3730a51fe0928d1eb6b2b933d9 (patch) | |
tree | 54f8ff1cf3fcfad94194deea3ba83734c6c92f8f /gcc/cp/pt.c | |
parent | ec5065ec064ad6976106a31f42469b214ed07db8 (diff) | |
download | gcc-e47f82ba6f93fb3730a51fe0928d1eb6b2b933d9.tar.gz |
cp:
* cp-tree.h (finish_sizeof, finish_alignof): Remove.
(expr_sizeof): Replace with ...
(cxx_sizeof_or_alignof_expr): ... here.
(cxx_sizeof_or_alignof_type): Make complain parameter a bool.
* parser.c (cp_parser_unary_expression): Commonize alignof and
sizeof handling.
* pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
substitution.
* semantics.c (finish_sizeof, finish_alignof): Remove.
* typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
becomes bool. Set TREE_READONLY.
(expr_sizeof): Replace with ...
(cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71054 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f47990132d2..53d483c1a9f 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8048,10 +8048,10 @@ tsubst_copy_and_build (tree t, op1 = RECUR (op1); --skip_evaluation; } - if (TREE_CODE (t) == SIZEOF_EXPR) - return finish_sizeof (op1); + if (TYPE_P (op1)) + return cxx_sizeof_or_alignof_type (op1, TREE_CODE (t), true); else - return finish_alignof (op1); + return cxx_sizeof_or_alignof_expr (op1, TREE_CODE (t)); case MODOP_EXPR: return build_x_modify_expr |