aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1996-08-13 15:39:22 +0000
committerMike Stump <mrs@gcc.gnu.org>1996-08-13 15:39:22 +0000
commit73aad9b9ff694fcaf423834d7e2c47046cac34cd (patch)
treee2b752085bc40e641e8888cd283761f6cb564dc0 /gcc/cp/decl2.c
parentc8c2dcdce1e0144357f43f9d3c015dfbab58957a (diff)
downloadgcc-73aad9b9ff694fcaf423834d7e2c47046cac34cd.zip
gcc-73aad9b9ff694fcaf423834d7e2c47046cac34cd.tar.gz
gcc-73aad9b9ff694fcaf423834d7e2c47046cac34cd.tar.bz2
87th Cygnus<->FSF quick merge
From-SVN: r12630
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index b4de01b..b5a0529 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -498,11 +498,6 @@ lang_decode_option (p)
flag_alt_external_templates = 0;
found = 1;
}
- else if (!strcmp (p, "ansi-overloading"))
- {
- warning ("-fansi-overloading is no longer meaningful");
- found = 1;
- }
else if (!strcmp (p, "repo"))
{
flag_use_repository = 1;
@@ -2876,6 +2871,7 @@ build_cleanup (decl)
extern int parse_time, varconst_time;
extern tree pending_templates;
+extern tree maybe_templates;
#define TIMEVAR(VAR, BODY) \
do { int otime = get_run_time (); BODY; VAR += get_run_time () - otime; } while (0)
@@ -2952,6 +2948,20 @@ finish_file ()
instantiate_decl (decl);
}
+ for (fnname = maybe_templates; fnname; fnname = TREE_CHAIN (fnname))
+ {
+ tree *args, fn, decl = TREE_VALUE (fnname);
+
+ if (DECL_INITIAL (decl))
+ continue;
+
+ fn = TREE_PURPOSE (fnname);
+ args = get_bindings (fn, decl);
+ fn = instantiate_template (fn, args);
+ free (args);
+ instantiate_decl (fn);
+ }
+
/* Push into C language context, because that's all
we'll need here. */
push_lang_context (lang_name_c);
@@ -3848,6 +3858,12 @@ mark_used (decl)
if (current_template_parms)
return;
assemble_external (decl);
+ /* Is it a synthesized method that needs to be synthesized? */
+ if (TREE_CODE (decl) == FUNCTION_DECL && DECL_CLASS_CONTEXT (decl)
+ && DECL_ARTIFICIAL (decl) && ! DECL_INITIAL (decl)
+ /* Kludge: don't synthesize for default args. */
+ && current_function_decl)
+ synthesize_method (decl);
if (DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl))
instantiate_decl (decl);
}