Commit 45707d31 by Mark Mitchell Committed by Mark Mitchell

decl2.c (do_nonmember_using_decl): Correct handling of simultaneous type/non-type bindings.

	* decl2.c (do_nonmember_using_decl): Correct handling of
	simultaneous type/non-type bindings.


	* g++.dg/parse/namespace9.C: New test.

From-SVN: r64323
parent 6d7b8b35
2003-03-13 Mark Mitchell <mark@codesourcery.com> 2003-03-13 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_nonmember_using_decl): Correct handling of
simultaneous type/non-type bindings.
* call.c (initialize_reference): Remove bogus assertion. * call.c (initialize_reference): Remove bogus assertion.
* decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09. * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
......
...@@ -4222,6 +4222,13 @@ do_nonmember_using_decl (tree scope, tree name, tree oldval, tree oldtype, ...@@ -4222,6 +4222,13 @@ do_nonmember_using_decl (tree scope, tree name, tree oldval, tree oldtype,
{ {
tree tmp, tmp1; tree tmp, tmp1;
if (oldval && !is_overloaded_fn (oldval))
{
if (!DECL_IMPLICIT_TYPEDEF_P (oldval))
error ("`%D' is already declared in this scope", name);
oldval = NULL_TREE;
}
*newval = oldval; *newval = oldval;
for (tmp = BINDING_VALUE (decls); tmp; tmp = OVL_NEXT (tmp)) for (tmp = BINDING_VALUE (decls); tmp; tmp = OVL_NEXT (tmp))
{ {
......
2003-03-13 Mark Mitchell <mark@codesourcery.com> 2003-03-13 Mark Mitchell <mark@codesourcery.com>
* g++.dg/parse/namespace9.C: New test.
* g++.dg/init/ref5.C: New test. * g++.dg/init/ref5.C: New test.
* g++.dg/parse/ptrmem1.C: Likewise. * g++.dg/parse/ptrmem1.C: Likewise.
......
namespace A {
void f();
}
int g()
{
struct f { };
using A::f;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment