* cp-tree.h: Declare flag_use_repository.
* pt.c (do_decl_instantiation): Don't complain about duplicate
instantiation with -frepo.
(do_type_instantiation): Likewise.
* decl2.c (lookup_arg_dependent): Note that we've already checked
the current namespace.
From-SVN: r28772
+1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
+
+ * cp-tree.h: Declare flag_use_repository.
+ * pt.c (do_decl_instantiation): Don't complain about duplicate
+ instantiation with -frepo.
+ (do_type_instantiation): Likewise.
+
+1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl2.c (lookup_arg_dependent): Note that we've already checked
+ the current namespace.
+
Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.1 Released.
and class qualifiers. */
extern int flag_do_squangling;
+/* Nonzero means generate separate instantiation control files and juggle
+ them at link time. */
+extern int flag_use_repository;
+
/* Nonzero if we want to issue diagnostics that the standard says are not
required. */
extern int flag_optional_diags;
tree args;
{
struct arg_lookup k;
+
k.name = name;
k.functions = fns;
- k.namespaces = NULL_TREE;
k.classes = NULL_TREE;
-
+
+ /* Note that we've already looked at the current namespace during normal
+ unqualified lookup, unless we found a decl in function scope. */
+ if (fns && ! TREE_PERMANENT (OVL_CURRENT (fns)))
+ k.namespaces = NULL_TREE;
+ else
+ k.namespaces = scratch_tree_cons (current_decl_namespace (),
+ NULL_TREE, NULL_TREE);
+
push_scratch_obstack ();
arg_assoc_args (&k, args);
pop_obstacks ();
We check DECL_INTERFACE_KNOWN so as not to complain when the
first instantiation was `extern' and the second is not, and
EXTERN_P for the opposite case. */
- if (DECL_INTERFACE_KNOWN (result) && !extern_p)
+ if (DECL_INTERFACE_KNOWN (result) && !extern_p && !flag_use_repository)
cp_pedwarn ("duplicate explicit instantiation of `%#D'", result);
/* If we've already instantiated the template, just return now. */
If CLASSTYPE_INTERFACE_ONLY, then the first explicit
instantiation was `extern', and if EXTERN_P then the second
is. Both cases are OK. */
- if (!CLASSTYPE_INTERFACE_ONLY (t) && !extern_p)
- cp_error ("duplicate explicit instantiation of `%#T'", t);
+ if (!CLASSTYPE_INTERFACE_ONLY (t) && !extern_p && !flag_use_repository)
+ cp_pedwarn ("duplicate explicit instantiation of `%#T'", t);
/* If we've already instantiated the template, just return now. */
if (!CLASSTYPE_INTERFACE_ONLY (t))