aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1996-03-22 23:11:55 +0000
committerMike Stump <mrs@gcc.gnu.org>1996-03-22 23:11:55 +0000
commit909e536aa51ba1dba536cb905dc8854c8b487738 (patch)
treebe761953f8502bf4503be31fb1298c410a2271e2 /gcc/cp/decl2.c
parentc7b1ed2b88ec0e8079c07ce759c73b83ded3b41c (diff)
downloadgcc-909e536aa51ba1dba536cb905dc8854c8b487738.zip
gcc-909e536aa51ba1dba536cb905dc8854c8b487738.tar.gz
gcc-909e536aa51ba1dba536cb905dc8854c8b487738.tar.bz2
85th Cygnus<->FSF quick merge
From-SVN: r11597
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index a902a4f..8077b5b 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1124,6 +1124,9 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
this down as a NULL_TREE into build_vec_delete. */
tree maxindex = NULL_TREE;
+ if (exp == error_mark_node)
+ return exp;
+
if (current_template_parms)
{
t = build_min (DELETE_EXPR, void_type_node, exp, size);
@@ -2822,10 +2825,6 @@ finish_file ()
start_time = get_run_time ();
- /* Push into C language context, because that's all
- we'll need here. */
- push_lang_context (lang_name_c);
-
/* Otherwise, GDB can get confused, because in only knows
about source for LINENO-1 lines. */
lineno -= 1;
@@ -2833,6 +2832,16 @@ finish_file ()
interface_unknown = 1;
interface_only = 0;
+ for (fnname = pending_templates; fnname; fnname = TREE_CHAIN (fnname))
+ {
+ tree decl = TREE_VALUE (fnname);
+ instantiate_decl (decl);
+ }
+
+ /* Push into C language context, because that's all
+ we'll need here. */
+ push_lang_context (lang_name_c);
+
#if 1
/* The reason for pushing garbage onto the global_binding_level is to
ensure that we can slice out _DECLs which pertain to virtual function
@@ -3082,11 +3091,6 @@ finish_file ()
if (flag_handle_signatures)
walk_sigtables ((void (*)())0, finish_sigtable_vardecl);
- for (fnname = pending_templates; fnname; fnname = TREE_CHAIN (fnname))
- {
- tree decl = TREE_VALUE (fnname);
- instantiate_decl (decl);
- }
for (fnname = saved_inlines; fnname; fnname = TREE_CHAIN (fnname))
{
tree decl = TREE_VALUE (fnname);