diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-22 23:57:08 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-22 23:57:08 +0000 |
commit | c79f94a2de0ff5b84115ead430c145bd55f9f145 (patch) | |
tree | bfd19fff8d2b9d5fc60b710cb3426bd7f1df5b92 /gcc/cp/pt.c | |
parent | eaa2deb0c5c041225bd90f5e328e6cf2f4915c9a (diff) | |
download | gcc-c79f94a2de0ff5b84115ead430c145bd55f9f145.tar.gz |
* c-common.c (flag_external_templates): Remove.
(flag_alt_external_templates): Likewise.
* c-common.h (flag_external_templates): Remove.
(flag_alt_external_templates): Likewise.
* c-opts.c (c_common_handle_option): Unsupport
-falt-external-templates and -ftemplates.
* doc/invoke.texi: Remove mention of -fexternal-templates and
-falt-external-templates.
* decl.c (start_function): Do not check
flag_alt_external_templates or flag_external_templates.
* decl2.c (warn_if_unknown_interface): Likewise.
* lex.c (extract_interface_info): Likewise.
* pt.c (lookup_template_class): Likewise.
PR c++/12862
* name-lookup.c (pushdecl): Look up all namespace-scope entities
in their corresponding namespace.
* g++.old-deja/g++.jason/template18.C: Remove.
* g++.old-deja/g++.jason/template37.C: Likewise.
PR c++/12862
* g++.dg/lookup/ns1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74954 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index d8b953a4686..e7a886380c2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4485,19 +4485,7 @@ lookup_template_class (tree d1, is set up. */ if (TREE_CODE (t) != ENUMERAL_TYPE) DECL_NAME (type_decl) = classtype_mangled_name (t); - if (!is_partial_instantiation) - { - /* For backwards compatibility; code that uses - -fexternal-templates expects looking up a template to - instantiate it. I think DDD still relies on this. - (jason 8/20/1998) */ - if (TREE_CODE (t) != ENUMERAL_TYPE - && flag_external_templates - && CLASSTYPE_INTERFACE_KNOWN (TREE_TYPE (template)) - && ! CLASSTYPE_INTERFACE_ONLY (TREE_TYPE (template))) - add_pending_template (t); - } - else + if (is_partial_instantiation) /* If the type makes use of template parameters, the code that generates debugging information will crash. */ DECL_IGNORED_P (TYPE_STUB_DECL (t)) = 1; @@ -5279,24 +5267,7 @@ instantiate_class_template (tree type) args = inner_args; } - if (flag_external_templates) - { - if (flag_alt_external_templates) - { - CLASSTYPE_INTERFACE_ONLY (type) = interface_only; - SET_CLASSTYPE_INTERFACE_UNKNOWN_X (type, interface_unknown); - } - else - { - CLASSTYPE_INTERFACE_ONLY (type) = CLASSTYPE_INTERFACE_ONLY (pattern); - SET_CLASSTYPE_INTERFACE_UNKNOWN_X - (type, CLASSTYPE_INTERFACE_UNKNOWN (pattern)); - } - } - else - { - SET_CLASSTYPE_INTERFACE_UNKNOWN (type); - } + SET_CLASSTYPE_INTERFACE_UNKNOWN (type); /* Set the input location to the template definition. This is needed if tsubsting causes an error. */ @@ -8642,9 +8613,6 @@ instantiate_template (tree tmpl, tree targ_ptr, tsubst_flags_t complain) template, not the most general template. */ DECL_TI_TEMPLATE (fndecl) = tmpl; - if (flag_external_templates) - add_pending_template (fndecl); - /* If we've just instantiated the main entry point for a function, instantiate all the alternate entry points as well. We do this by cloning the instantiation of the main entry point, not by @@ -10529,9 +10497,6 @@ do_decl_instantiation (tree decl, tree storage) return; } - if (flag_external_templates) - return; - if (storage == NULL_TREE) ; else if (storage == ridpointers[(int) RID_EXTERN]) @@ -10600,11 +10565,6 @@ do_type_instantiation (tree t, tree storage, tsubst_flags_t complain) complete_type (t); - /* With -fexternal-templates, explicit instantiations are treated the same - as implicit ones. */ - if (flag_external_templates) - return; - if (!COMPLETE_TYPE_P (t)) { if (complain & tf_error) @@ -10987,22 +10947,6 @@ instantiate_decl (tree d, int defer_ok) else repo_template_used (d); - if (flag_external_templates && ! DECL_INTERFACE_KNOWN (d)) - { - if (flag_alt_external_templates) - { - if (interface_unknown) - warn_if_unknown_interface (d); - } - else if (DECL_INTERFACE_KNOWN (code_pattern)) - { - DECL_INTERFACE_KNOWN (d) = 1; - DECL_NOT_REALLY_EXTERN (d) = ! DECL_EXTERNAL (code_pattern); - } - else - warn_if_unknown_interface (code_pattern); - } - if (at_eof) import_export_decl (d); } |