+2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/2184
+ * decl2.c (do_local_using_decl): Push the decls, even in a
+ template.
+
2001-05-22 Mark Mitchell <mark@codesourcery.com>
* optimize.c (initialize_inlined_parameters): Don't set
if (building_stmt_tree ()
&& at_function_scope_p ())
add_decl_stmt (decl);
- if (processing_template_decl)
- return;
oldval = lookup_name_current_level (name);
oldtype = lookup_type_current_level (name);
+2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.pt/using1.C: Adjust.
+ * g++.old-deja/g++.pt/using2.C: New test.
+
2001-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/charconst.c: New tests.
template void f<float> ();
+int foo (int) { return 0;}
+
namespace B
{
int foo (int) { return 1;}
template int baz<float> ();
};
-int foo (int) { return 0;}
-
int main ()
{
return B::baz<float> ();
--- /dev/null
+// Build don't link:
+//
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 May 2001 <nathan@codesourcery.com>
+
+// Bug 2184. Using decls in templates weren't doing the right thing.
+
+namespace N {
+ template <class T>
+ class vector {};
+}
+
+void g(const int&) {
+ using N::vector;
+ typedef vector<int> V;
+}
+
+template <class J>
+void f(const J&) {
+ using N::vector;
+ typedef vector<int> V;
+}
+
+int main() {
+ f(0);
+}