aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-11-10 04:29:45 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-11-10 04:29:45 +0000
commit0a7394bc1ac70f2a16ee15731457af04fb0b6e48 (patch)
tree6fdac42a5241d2f4e1527d266faf70cae27bb05d /gcc/cp/pt.c
parentabffe289db68ad3968cd592dc33a00500a07aaba (diff)
downloadgcc-0a7394bc1ac70f2a16ee15731457af04fb0b6e48.zip
gcc-0a7394bc1ac70f2a16ee15731457af04fb0b6e48.tar.gz
gcc-0a7394bc1ac70f2a16ee15731457af04fb0b6e48.tar.bz2
Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
* Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o. (c-dump.o): New target. * c-common.h (flag_dump_translation_unit): New variable. (C_TYPE_QUALS): New macro. (strip_array_types): New function. (DECL_C_BIT_FIELD): New macro. (SET_DECL_C_BIT_FIELD): Likewise. (CLEAR_DECL_C_BIT_FIELD): Likewise. (dump_info_p): New typedef. (dump_tree_fn): Likewise. (lang_dump_tree): New variable. (dump_node_to_file): New function. * c-common.c (flag_dump_translation_unit): Define it. (strip_array_types): New function. * c-decl.c (c_decode_option): Handle -fdump-translation-unit. * c-lang.c (finish_file): Call dump_node_to_file if flag_dump_translation_unit. * c-semantics.c (mark_rtl_for_local_static): Fix typo in comment. * c-tree.h (DECL_C_BIT_FIELD): Remove declaration. * c-dump.c: New file. * Make-lang.in (CXX_C_OBJS): Add c-dump.o. (dump.o): Update dependency list. * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. (flag_dump_translation_unit): Likewise. (CP_TYPE_QUALS): Adjust definition. (DECL_C_BIT_FIELD): Remove. (SET_DECL_C_BIT_FIELD): Likewise. (CLEAR_DECL_C_BIT_FIELD): Likewise. (add_maybe_template): Likewise. (strip_array_types): Likewise. (dump_node_to_file): Likewise. (cp_dump_tree): New function. * decl.c (init_decl_processing): Set lang_dump_tree. * decl2.c (flag_dump_translation_unit): Remove. * dump.c: Move most of it to ../c-dump.c. (cp_dump_tree): New function. * pt.c (add_maybe_template): Remove. * typeck.c (strip_array_types): Likewise. From-SVN: r37358
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 7098d7d..dd190ea 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5654,7 +5654,7 @@ tsubst_decl (t, args, type, in_decl)
/* We do NOT check for matching decls pushed separately at this
point, as they may not represent instantiations of this
template, and in any case are considered separate under the
- discrete model. Instead, see add_maybe_template. */
+ discrete model. */
r = copy_decl (t);
DECL_USE_TEMPLATE (r) = 0;
TREE_TYPE (r) = type;
@@ -9871,34 +9871,6 @@ tsubst_initializer_list (t, argvec)
return first;
}
-/* D is an undefined function declaration in the presence of templates with
- the same name, listed in FNS. If one of them can produce D as an
- instantiation, remember this so we can instantiate it at EOF if D has
- not been defined by that time. */
-
-void
-add_maybe_template (d, fns)
- tree d, fns;
-{
- tree t;
-
- if (DECL_MAYBE_TEMPLATE (d))
- return;
-
- t = most_specialized (fns, d, NULL_TREE);
- if (! t)
- return;
- if (t == error_mark_node)
- {
- cp_error ("ambiguous template instantiation for `%D'", d);
- return;
- }
-
- *maybe_template_tail = tree_cons (t, d, NULL_TREE);
- maybe_template_tail = &TREE_CHAIN (*maybe_template_tail);
- DECL_MAYBE_TEMPLATE (d) = 1;
-}
-
/* Set CURRENT_ACCESS_SPECIFIER based on the protection of DECL. */
static void