aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-12-01 17:51:51 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-12-01 17:51:51 +0000
commitc9f8536c5dc8c115f26aaeb87585dbce0eeb4a10 (patch)
tree58fa62032c3e44c9d8f282780afee759f3d7edba /gcc/cp
parent335c9de73baef4d5c67c1b00dd52caff22d92f21 (diff)
downloadgcc-c9f8536c5dc8c115f26aaeb87585dbce0eeb4a10.zip
gcc-c9f8536c5dc8c115f26aaeb87585dbce0eeb4a10.tar.gz
gcc-c9f8536c5dc8c115f26aaeb87585dbce0eeb4a10.tar.bz2
re PR c++/8332 (strlen/template interaction causes ICE)
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. From-SVN: r59689
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/decl2.c6
-rw-r--r--gcc/cp/except.c2
4 files changed, 14 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index aee593f..f00d0fb 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2002-12-01 Mark Mitchell <mark@codesourcery.com>
+
+ 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.
+
2002-11-30 Mark Mitchell <mark@codesourcery.com>
PR c++/8227
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index dbb96eb..f3ffbf1 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6656,7 +6656,7 @@ cxx_init_decl_processing ()
ptr_ftype_sizetype
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE,
- c_size_type_node,
+ size_type_node,
void_list_node));
newtype = build_exception_variant
(ptr_ftype_sizetype, add_exception_specifier
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 209a15b..61efb58 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1468,17 +1468,17 @@ coerce_new_type (type)
e = 1, error ("`operator new' must return type `%T'", ptr_type_node);
if (!args || args == void_list_node
- || !same_type_p (TREE_VALUE (args), c_size_type_node))
+ || !same_type_p (TREE_VALUE (args), size_type_node))
{
e = 2;
if (args && args != void_list_node)
args = TREE_CHAIN (args);
- pedwarn ("`operator new' takes type `size_t' (`%T') as first parameter", c_size_type_node);
+ pedwarn ("`operator new' takes type `size_t' (`%T') as first parameter", size_type_node);
}
switch (e)
{
case 2:
- args = tree_cons (NULL_TREE, c_size_type_node, args);
+ args = tree_cons (NULL_TREE, size_type_node, args);
/* FALLTHROUGH */
case 1:
type = build_exception_variant
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 5e2ae89..848ef51 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -503,7 +503,7 @@ do_allocate_exception (type)
else
{
/* Declare void *__cxa_allocate_exception(size_t). */
- tree tmp = tree_cons (NULL_TREE, c_size_type_node, void_list_node);
+ tree tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
fn = push_library_fn (fn, build_function_type (ptr_type_node, tmp));
}