summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-04 22:45:31 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-04 22:45:31 +0000
commit92192583f3db8b8791771e6ccb767206b49fe941 (patch)
tree1a2ee6015c9e6c4f08b35ecd8a67ece8bed0f090 /gcc/cp
parent75ff59855f0693d6b4397ead778821f6d1b0b8be (diff)
downloadgcc-92192583f3db8b8791771e6ccb767206b49fe941.tar.gz
Index: ChangeLog
2002-08-04 Geoffrey Keating <geoffk@redhat.com> * Makefile.in (sdbout.o): Doesn't need $(OBSTACK_H). * collect2.h (permanent_obstack): Delete declaration. * collect2.c (permanent_obstack): Delete definition. (main): Don't initialise permanent_obstack. Use xstrdup instead. * expr.c: Don't include obstack.h. (permanent_obstack): Delete declaration. * function.c: Don't include obstack.h. (permanent_obstack): Delete declaration. * integrate.c: Don't include obstack.h. (function_maybepermanent_obstack): Delete declaration. * print-tree.c (debug_tree): Use x*alloc not permalloc. * sdbout.c (gen_fake_label): Use x*alloc not permalloc. * tlink.c (pfgets): Use xstrdup not permanent_obstack. * toplev.c (lang_independent_init): Rename init_obstacks to init_ttree. * tree.h: Rename init_obstacks to init_ttree. Remove declarations of permalloc, expralloc, perm_calloc. * tree.c (permanent_obstack): Delete definition. (init_ttree): Rename from init_obstacks. (permalloc): Delete. (perm_calloc): Delete. (dump_tree_statistics): Don't print information about permanent_obstack. * varasm.c (assemble_start_function): Use xstrdup instead of permalloc/strcpy. (assemble_variable): Likewise. * config/alpha/alpha.c (unicosmk_need_dex): Use xmalloc instead of permalloc. (unicosmk_add_extern): Likewise. * config/c4x/c4x.c (c4x_external_ref): Likewise. (c4x_global_label): Likewise. * config/frv/frv.c (frv_encode_section_info): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_record_exported_symbol): Likewise. * config/mips/mips.c (mips_output_external): Likewise. (mips_output_external_libcall): Likewise. * config/pa/pa.c: (permanent_obstack): Delete declaration. (output_call): Use ggc_strdup instead of allocating on permanent_obstack. * config/romp/romp.c: Include ggc.h. (get_symref): Don't declare permanent_obstack, use ggc_strdup intead of permanent_obstack. * config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use concat instead of permalloc. * config/rs6000/rs6000.c (rs6000_gen_section_name): Use xmalloc instead of permalloc * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Use concat instead of permalloc. * config/vax/vax.c (vms_check_external): Use xmalloc instead of permalloc. Index: cp/ChangeLog 2002-08-04 Geoffrey Keating <geoffk@redhat.com> * cvt.c (ocp_convert): Delete obsolete code. * parse.y (permanent_obstack): Delete declaration. * pt.c (permanent_obstack): Delete declaration. * repo.c (permanent_obstack): Delete declaration. (open_repo_file): Use xmalloc instead of permanent_obstack. (init_repo): Use xstrdup instead of permanent_obstack. Index: java/ChangeLog 2002-08-04 Geoffrey Keating <geoffk@redhat.com> * class.c: (permanent_obstack): Delete declaration. * constants.c: (permanent_obstack): Delete declaration. * except.c: (permanent_obstack): Delete declaration. * expr.c: (permanent_obstack): Delete declaration. * jcf-parse.c: (permanent_obstack): Delete declaration. (saveable_obstack): Delete declaration. * parse.h: (permanent_obstack): Delete declaration. * typeck.c: (permanent_obstack): Delete declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56035 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/cvt.c8
-rw-r--r--gcc/cp/parse.y2
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/repo.c15
5 files changed, 15 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ee0a612c1b3..4001a17557c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-04 Geoffrey Keating <geoffk@redhat.com>
+
+ * cvt.c (ocp_convert): Delete obsolete code.
+ * parse.y (permanent_obstack): Delete declaration.
+ * pt.c (permanent_obstack): Delete declaration.
+ * repo.c (permanent_obstack): Delete declaration.
+ (open_repo_file): Use xmalloc instead of permanent_obstack.
+ (init_repo): Use xstrdup instead of permanent_obstack.
+
2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (VF_DERIVED_VALUE): Remove.
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index ee01a31a566..fd4b6b96757 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -779,14 +779,6 @@ ocp_convert (type, expr, convtype, flags)
return build_cplus_new (type, ctor);
}
- /* If TYPE or TREE_TYPE (E) is not on the permanent_obstack,
- then it won't be hashed and hence compare as not equal,
- even when it is. */
- if (code == ARRAY_TYPE
- && TREE_TYPE (TREE_TYPE (e)) == TREE_TYPE (type)
- && index_type_equal (TYPE_DOMAIN (TREE_TYPE (e)), TYPE_DOMAIN (type)))
- return e;
-
if (flags & LOOKUP_COMPLAIN)
error ("conversion from `%T' to non-scalar type `%T' requested",
TREE_TYPE (expr), type);
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 0fa97743734..b7b9d30c236 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -44,8 +44,6 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
#include "ggc.h"
-extern struct obstack permanent_obstack;
-
/* Like YYERROR but do call yyerror. */
#define YYERROR1 { yyerror ("syntax error"); YYERROR; }
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index d279ed0a72d..406e54aa1b8 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -47,8 +47,6 @@ Boston, MA 02111-1307, USA. */
returning an int. */
typedef int (*tree_fn_t) PARAMS ((tree, void*));
-extern struct obstack permanent_obstack;
-
/* The PENDING_TEMPLATES is a TREE_LIST of templates whose
instantiations have been deferred, either because their definitions
were not yet available, or because we were putting off doing the
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 6aacebfdd60..e27d8c2199e 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -50,7 +50,6 @@ static FILE *repo_file;
static char *old_args, *old_dir, *old_main;
static struct obstack temporary_obstack;
-extern struct obstack permanent_obstack;
#define IDENTIFIER_REPO_USED(NODE) (TREE_LANG_FLAG_3 (NODE))
#define IDENTIFIER_REPO_CHOSEN(NODE) (TREE_LANG_FLAG_4 (NODE))
@@ -292,8 +291,9 @@ open_repo_file (filename)
if (! p)
p = s + strlen (s);
- obstack_grow (&permanent_obstack, s, p - s);
- repo_name = obstack_copy0 (&permanent_obstack, ".rpo", 4);
+ repo_name = xmalloc (p - s + 5);
+ memcpy (repo_name, s, p - s);
+ memcpy (repo_name + (p - s), ".rpo", 5);
repo_file = fopen (repo_name, "r");
}
@@ -332,16 +332,13 @@ init_repo (filename)
switch (buf[0])
{
case 'A':
- old_args = obstack_copy0 (&permanent_obstack, buf + 2,
- strlen (buf + 2));
+ old_args = ggc_strdup (buf + 2);
break;
case 'D':
- old_dir = obstack_copy0 (&permanent_obstack, buf + 2,
- strlen (buf + 2));
+ old_dir = ggc_strdup (buf + 2);
break;
case 'M':
- old_main = obstack_copy0 (&permanent_obstack, buf + 2,
- strlen (buf + 2));
+ old_main = ggc_strdup (buf + 2);
break;
case 'C':
case 'O':