summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-12-01 17:51:51 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-12-01 17:51:51 +0000
commit654ef926d6a1fe8711485d13a2c42f3955e0da5b (patch)
tree58fa62032c3e44c9d8f282780afee759f3d7edba /gcc/c-common.c
parentfecaecc9e3f324944897a6e827f96f613db8f3d8 (diff)
downloadgcc-654ef926d6a1fe8711485d13a2c42f3955e0da5b.tar.gz
PR c++/8332
PR c++/8493 * decl.c (cxx_init_decl_processing): Use size_type_node, not c_size_type_node. * decl2.c (coerce_new_type): Likewise. * except.c (do_allocate_exception): Likewise. * builtin-types.def (BT_SIZE): Use size_type_node. * builtins.c (fold_builtin): Make the builtin strlen returns a size_t, not a sizetype. * c-common.c (c_sizeof_or_alignof_type): Use size_type_node, not c_size_type_node. (c_alignof_expr): Likewise. (c_common_nodes_and_builtins): Likewise. * c-common.h (CTI_C_SIZE_TYPE): Remove. (c_size_type_node): Likewise. * c-format.c (T_ST): Use size_type_node, not c_size_type_node. * tree.h (TI_SIZE_TYPE): New enumeral. (size_type_node): Likewise. PR c++/8332 PR c++/8493 * g++.dg/template/strlen1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index f32456d455b..35adf760020 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -3090,7 +3090,7 @@ c_sizeof_or_alignof_type (type, op, complain)
TYPE_IS_SIZETYPE means that certain things (like overflow) will
never happen. However, this node should really have type
`size_t', which is just a typedef for an ordinary integer type. */
- value = fold (build1 (NOP_EXPR, c_size_type_node, value));
+ value = fold (build1 (NOP_EXPR, size_type_node, value));
my_friendly_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (value)), 20001021);
return value;
@@ -3141,7 +3141,7 @@ c_alignof_expr (expr)
else
return c_alignof (TREE_TYPE (expr));
- return fold (build1 (NOP_EXPR, c_size_type_node, t));
+ return fold (build1 (NOP_EXPR, size_type_node, t));
}
/* Handle C and C++ default attributes. */
@@ -3284,10 +3284,10 @@ c_common_nodes_and_builtins ()
/* `unsigned long' is the standard type for sizeof.
Note that stddef.h uses `unsigned long',
and this must agree, even if long and int are the same size. */
- c_size_type_node =
+ size_type_node =
TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE)));
- signed_size_type_node = c_common_signed_type (c_size_type_node);
- set_sizetype (c_size_type_node);
+ signed_size_type_node = c_common_signed_type (size_type_node);
+ set_sizetype (size_type_node);
build_common_tree_nodes_2 (flag_short_double);